summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-11 14:24:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-11 14:24:55 +0000
commit4daa963c181b90eb8758f9cf7064f5926c509ced (patch)
tree8b761dab895a8a83d26ce73e5a6db469bcf28b32
parent8adae8e8f5f2c93820b20c792070039b21239b7f (diff)
downloadmandoc-4daa963c181b90eb8758f9cf7064f5926c509ced.tar.gz
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@.
-rw-r--r--mdoc_validate.c6
-rw-r--r--regress/mdoc/No/punct.out_lint1
2 files changed, 3 insertions, 4 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 5af39eb0..51b49697 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -184,7 +184,7 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = {
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 == ' ') {
diff --git a/regress/mdoc/No/punct.out_lint b/regress/mdoc/No/punct.out_lint
index 15430486..e46cd67f 100644
--- a/regress/mdoc/No/punct.out_lint
+++ b/regress/mdoc/No/punct.out_lint
@@ -23,4 +23,3 @@ mandoc: punct.in:71:7: WARNING: skipping empty macro: No
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.