aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-07-11 17:06:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-07-11 17:06:17 +0000
commit3438a5cfefb69c7f5343ce1e20296f7b635cabce (patch)
treed130cf21a50b40f4f6f82ab538f9a1edae31172a /regress
parenta597f1a3e2780fed1216f2237e8a276110b0daef (diff)
downloadmandoc-3438a5cfefb69c7f5343ce1e20296f7b635cabce.tar.gz
mandoc-3438a5cfefb69c7f5343ce1e20296f7b635cabce.tar.zst
mandoc-3438a5cfefb69c7f5343ce1e20296f7b635cabce.zip
When parsing a tab character that is not preceded by a space character
on an .It -column line, args() sets the MDOC_PHRASEQL flag to Quote the Last word of the Phrase. Even if it turns out this quoting is not needed because the word is already quoted for other reasons, clear the flag at the end of parsing the phrase, such that the flag does not leak to the next phrase. This patch fixes the bug that the trailing Macro on a line of the form .It "word<tab>word" Ta word Macro<eol> was incorrectly considered quoted and hence not parsed. Bug found by Havard Eidnes (he@) with the NetBSD gettytab(5) manual page: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54361 Reported via Thomas Klausner (wiz@).
Diffstat (limited to 'regress')
-rw-r--r--regress/mdoc/Bl/column.in7
-rw-r--r--regress/mdoc/Bl/column.out_ascii2
-rw-r--r--regress/mdoc/Bl/column.out_lint2
-rw-r--r--regress/mdoc/Bl/column.out_markdown2
4 files changed, 7 insertions, 6 deletions
diff --git a/regress/mdoc/Bl/column.in b/regress/mdoc/Bl/column.in
index a6c791d7..8bb32698 100644
--- a/regress/mdoc/Bl/column.in
+++ b/regress/mdoc/Bl/column.in
@@ -1,5 +1,5 @@
-.\" $OpenBSD: column.in,v 1.10 2017/07/04 14:53:24 schwarze Exp $
-.Dd $Mdocdate: July 4 2017 $
+.\" $OpenBSD: column.in,v 1.11 2019/07/11 16:56:52 schwarze Exp $
+.Dd $Mdocdate: July 11 2019 $
.Dt BL-COLUMN 1
.Os
.Sh NAME
@@ -81,7 +81,8 @@
.\" Mixed tab and Ta
.Bl -column a b c d
.It a b c d
-.It a b c Ta d
+.It "a b c" Ta
+d
.It a b Ta c d
.It a b Ta c Ta d
.It a Ta b c d
diff --git a/regress/mdoc/Bl/column.out_ascii b/regress/mdoc/Bl/column.out_ascii
index 732cf2d9..6734c1a1 100644
--- a/regress/mdoc/Bl/column.out_ascii
+++ b/regress/mdoc/Bl/column.out_ascii
@@ -71,4 +71,4 @@ DDEESSCCRRIIPPTTIIOONN
aa bb tab at eol
aa bb cc dd
-OpenBSD July 4, 2017 OpenBSD
+OpenBSD July 11, 2019 OpenBSD
diff --git a/regress/mdoc/Bl/column.out_lint b/regress/mdoc/Bl/column.out_lint
index 4d64846e..49135fad 100644
--- a/regress/mdoc/Bl/column.out_lint
+++ b/regress/mdoc/Bl/column.out_lint
@@ -4,4 +4,4 @@ mandoc: column.in:75:2: WARNING: skipping empty macro: It
mandoc: column.in:77:2: WARNING: wrong number of cells: 2 columns, 4 cells
mandoc: column.in:78:2: WARNING: wrong number of cells: 2 columns, 5 cells
mandoc: column.in:79:2: WARNING: skipping empty macro: It
-mandoc: column.in:107:18: WARNING: skipping -width argument: Bl -column
+mandoc: column.in:108:18: WARNING: skipping -width argument: Bl -column
diff --git a/regress/mdoc/Bl/column.out_markdown b/regress/mdoc/Bl/column.out_markdown
index 6e3e27b2..a9b84156 100644
--- a/regress/mdoc/Bl/column.out_markdown
+++ b/regress/mdoc/Bl/column.out_markdown
@@ -75,4 +75,4 @@ BL-COLUMN(1) - General Commands Manual
aa bb cc dd
-OpenBSD - July 4, 2017
+OpenBSD - July 11, 2019