source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Do not issue the message "no blank before trailing delimiter"
Date: Sun, 11 Jun 2017 09:24:58 -0500 (EST)	[thread overview]
Message-ID: <10610783335066556428.enqueue@fantadrom.bsd.lv> (raw)

Log Message:
-----------
Do not issue the message "no blank before trailing delimiter" for .No.
In practice, that message only matters inside .Bf, and even there, it
can occasionally be a false positive.  In all other cases, it usually
is a false positive, so it is better to drop it outright.
Suggested by jmc@.

Modified Files:
--------------
    mdocml:
        mdoc_validate.c
    mdocml/regress/mdoc/No:
        punct.out_lint

Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_validate.c,v
retrieving revision 1.334
retrieving revision 1.335
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.334 -r1.335
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -184,7 +184,7 @@ static	const v_post __mdoc_valids[MDOC_M
 	NULL,		/* Eo */
 	post_xx,	/* Fx */
 	post_delim,	/* Ms */
-	post_delim,	/* No */
+	NULL,		/* No */
 	post_ns,	/* Ns */
 	post_xx,	/* Nx */
 	post_xx,	/* Ox */
@@ -481,8 +481,8 @@ post_delim(POST_ARGS)
 
 	/* At least three alphabetic words with a sentence ending. */
 	if (strchr("!.:?", *lc) != NULL && (tok == MDOC_Em ||
-	    tok == MDOC_Li || tok == MDOC_No || tok == MDOC_Po ||
-	    tok == MDOC_Pq || tok == MDOC_Sy)) {
+	    tok == MDOC_Li || tok == MDOC_Po || tok == MDOC_Pq ||
+	    tok == MDOC_Sy)) {
 		nw = 0;
 		for (cp = lc - 1; cp >= nch->string; cp--) {
 			if (*cp == ' ') {
Index: punct.out_lint
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/mdoc/No/punct.out_lint,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lregress/mdoc/No/punct.out_lint -Lregress/mdoc/No/punct.out_lint -u -p -r1.3 -r1.4
--- regress/mdoc/No/punct.out_lint
+++ regress/mdoc/No/punct.out_lint
@@ -23,4 +23,3 @@ mandoc: punct.in:71:7: WARNING: skipping
 mandoc: punct.in:74:7: WARNING: skipping empty macro: No
 mandoc: punct.in:75:7: WARNING: skipping empty macro: No
 mandoc: punct.in:83:2: WARNING: skipping empty macro: No
-mandoc: punct.in:86:6: STYLE: no blank before trailing delimiter: No a.
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2017-06-11 14:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10610783335066556428.enqueue@fantadrom.bsd.lv \
    --to=schwarze@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).