aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-02-06 16:29:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-02-06 16:29:57 +0000
commitffb5a0b2e4f4bb037b6af7391115d614db2d9181 (patch)
tree26447ccce99275918cad50a3ea1a14048a416a82
parent886ae5c2d18775608683ff2241fb58ed9dbcbcf7 (diff)
downloadmandoc-ffb5a0b2e4f4bb037b6af7391115d614db2d9181.tar.gz
mandoc-ffb5a0b2e4f4bb037b6af7391115d614db2d9181.tar.zst
mandoc-ffb5a0b2e4f4bb037b6af7391115d614db2d9181.zip
Delete the "no blank before trailing delimiter" check from the
partial explicit macros. Leah Neukirchen <leah at vuxu dot org> rightfully points out that the check makes no sense for these macros.
-rw-r--r--mdoc_validate.c19
-rw-r--r--regress/mdoc/Aq/empty.out_lint1
-rw-r--r--regress/mdoc/Brq/empty.out_lint1
-rw-r--r--regress/mdoc/Oo/Makefile1
-rw-r--r--regress/mdoc/Oo/punct.in6
-rw-r--r--regress/mdoc/Oo/punct.out_ascii2
-rw-r--r--regress/mdoc/Oo/punct.out_lint1
-rw-r--r--regress/mdoc/Oo/punct.out_markdown3
-rw-r--r--regress/mdoc/Qq/empty.out_lint1
-rw-r--r--regress/mdoc/Sq/empty.out_lint1
10 files changed, 10 insertions, 26 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index e95bebfa..642a670a 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.353 2017/09/12 18:21:03 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.354 2018/02/06 16:29:57 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -169,12 +169,12 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = {
post_hyph, /* %T */ /* FIXME: can be used outside Rs/Re. */
NULL, /* %V */
NULL, /* Ac */
- post_delim_nb, /* Ao */
+ NULL, /* Ao */
post_delim_nb, /* Aq */
post_at, /* At */
NULL, /* Bc */
post_bf, /* Bf */
- post_delim_nb, /* Bo */
+ NULL, /* Bo */
NULL, /* Bq */
post_xx, /* Bsx */
post_bx, /* Bx */
@@ -194,16 +194,16 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = {
post_xx, /* Ox */
NULL, /* Pc */
NULL, /* Pf */
- post_delim_nb, /* Po */
+ NULL, /* Po */
post_delim_nb, /* Pq */
NULL, /* Qc */
post_delim_nb, /* Ql */
- post_delim_nb, /* Qo */
+ NULL, /* Qo */
post_delim_nb, /* Qq */
NULL, /* Re */
post_rs, /* Rs */
NULL, /* Sc */
- post_delim_nb, /* So */
+ NULL, /* So */
post_delim_nb, /* Sq */
post_sm, /* Sm */
post_sx, /* Sx */
@@ -214,7 +214,7 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = {
NULL, /* Xo */
post_fo, /* Fo */
NULL, /* Fc */
- post_delim_nb, /* Oo */
+ NULL, /* Oo */
NULL, /* Oc */
post_bk, /* Bk */
NULL, /* Ek */
@@ -227,7 +227,7 @@ static const v_post __mdoc_valids[MDOC_MAX - MDOC_Dd] = {
post_delim_nb, /* Lk */
post_defaults, /* Mt */
post_delim_nb, /* Brq */
- post_delim_nb, /* Bro */
+ NULL, /* Bro */
NULL, /* Brc */
NULL, /* %C */
post_es, /* Es */
@@ -530,8 +530,7 @@ post_delim_nb(POST_ARGS)
/* At least three alphabetic words with a sentence ending. */
if (strchr("!.:?", *lc) != NULL && (tok == MDOC_Em ||
- tok == MDOC_Li || tok == MDOC_Po || tok == MDOC_Pq ||
- tok == MDOC_Sy)) {
+ tok == MDOC_Li || tok == MDOC_Pq || tok == MDOC_Sy)) {
nw = 0;
for (cp = lc - 1; cp >= nch->string; cp--) {
if (*cp == ' ') {
diff --git a/regress/mdoc/Aq/empty.out_lint b/regress/mdoc/Aq/empty.out_lint
index d0d8401a..c2824c15 100644
--- a/regress/mdoc/Aq/empty.out_lint
+++ b/regress/mdoc/Aq/empty.out_lint
@@ -1,2 +1 @@
mandoc: empty.in:12:14: STYLE: no blank before trailing delimiter: Aq user@host:
-mandoc: empty.in:15:9: STYLE: no blank before trailing delimiter: Ao full:
diff --git a/regress/mdoc/Brq/empty.out_lint b/regress/mdoc/Brq/empty.out_lint
index a7092ae5..434bcdb6 100644
--- a/regress/mdoc/Brq/empty.out_lint
+++ b/regress/mdoc/Brq/empty.out_lint
@@ -1,2 +1 @@
mandoc: empty.in:12:19: STYLE: no blank before trailing delimiter: Brq user@host)
-mandoc: empty.in:15:14: STYLE: no blank before trailing delimiter: Bro full)
diff --git a/regress/mdoc/Oo/Makefile b/regress/mdoc/Oo/Makefile
index e98c9475..67bf2449 100644
--- a/regress/mdoc/Oo/Makefile
+++ b/regress/mdoc/Oo/Makefile
@@ -1,6 +1,5 @@
# $OpenBSD: Makefile,v 1.1 2012/07/07 14:10:55 schwarze Exp $
REGRESS_TARGETS = punct
-LINT_TARGETS = punct
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Oo/punct.in b/regress/mdoc/Oo/punct.in
index 59fd328a..8348226a 100644
--- a/regress/mdoc/Oo/punct.in
+++ b/regress/mdoc/Oo/punct.in
@@ -1,5 +1,5 @@
.\" $OpenBSD: punct.in,v 1.4 2017/07/04 14:53:26 schwarze Exp $
-.Dd $Mdocdate: July 4 2017 $
+.Dd $Mdocdate: February 6 2018 $
.Dt OO-PUNCT 1
.Os
.Sh NAME
@@ -22,7 +22,3 @@ at the end:
.Oo Oo a (
.Oc |
.Oc
-.Pp
-missing blank:
-.Oo a.
-.Oc
diff --git a/regress/mdoc/Oo/punct.out_ascii b/regress/mdoc/Oo/punct.out_ascii
index 6c4fbfa3..91415a89 100644
--- a/regress/mdoc/Oo/punct.out_ascii
+++ b/regress/mdoc/Oo/punct.out_ascii
@@ -10,6 +10,4 @@ DDEESSCCRRIIPPTTIIOONN
at the end: [[a (] |]
- missing blank: [a.]
-
OpenBSD July 4, 2017 OpenBSD
diff --git a/regress/mdoc/Oo/punct.out_lint b/regress/mdoc/Oo/punct.out_lint
deleted file mode 100644
index 9f9beaae..00000000
--- a/regress/mdoc/Oo/punct.out_lint
+++ /dev/null
@@ -1 +0,0 @@
-mandoc: punct.in:27:6: STYLE: no blank before trailing delimiter: Oo a.
diff --git a/regress/mdoc/Oo/punct.out_markdown b/regress/mdoc/Oo/punct.out_markdown
index 5ad93965..8c530fa8 100644
--- a/regress/mdoc/Oo/punct.out_markdown
+++ b/regress/mdoc/Oo/punct.out_markdown
@@ -20,7 +20,4 @@ at the end:
\[\[a (]
|]
-missing blank:
-\[a.]
-
OpenBSD - July 4, 2017
diff --git a/regress/mdoc/Qq/empty.out_lint b/regress/mdoc/Qq/empty.out_lint
index 879cd127..3789925c 100644
--- a/regress/mdoc/Qq/empty.out_lint
+++ b/regress/mdoc/Qq/empty.out_lint
@@ -1,2 +1 @@
mandoc: empty.in:12:18: STYLE: no blank before trailing delimiter: Qq user@host)
-mandoc: empty.in:15:13: STYLE: no blank before trailing delimiter: Qo full)
diff --git a/regress/mdoc/Sq/empty.out_lint b/regress/mdoc/Sq/empty.out_lint
index 00d8e228..1f1ccb40 100644
--- a/regress/mdoc/Sq/empty.out_lint
+++ b/regress/mdoc/Sq/empty.out_lint
@@ -1,2 +1 @@
mandoc: empty.in:12:18: STYLE: no blank before trailing delimiter: Sq user@host)
-mandoc: empty.in:15:13: STYLE: no blank before trailing delimiter: So full)