From: schwarze Date: Sat, 13 Dec 2014 13:13:26 +0000 (+0000) Subject: Fix a regression found by Carsten dot Kunze at arcor dot de: X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b3fc894d144506e35e0ba54b1424ef226e161525;p=openbsd Fix a regression found by Carsten dot Kunze at arcor dot de: Do not show bogus quotes when .Bl -column phrases are quoted. --- diff --git a/regress/usr.bin/mandoc/mdoc/Bl/column.in b/regress/usr.bin/mandoc/mdoc/Bl/column.in index 29706fade2c..e2bd961f408 100644 --- a/regress/usr.bin/mandoc/mdoc/Bl/column.in +++ b/regress/usr.bin/mandoc/mdoc/Bl/column.in @@ -1,4 +1,4 @@ -.Dd December 24, 2009 +.Dd December 13, 2014 .Dt BL-COLUMN 1 .Os OpenBSD .Sh NAME @@ -14,6 +14,10 @@ .\" avoid "c" which means "cm" .Bl -column "a" "b" "cc" .It a Ta b Ta cc +.It a b cc +.It "a" b cc +.It "a b" cc +.It "a b cc" .El .Bl -column "a" "b" "cc" "d" .It a Ta b Ta cc Ta d diff --git a/regress/usr.bin/mandoc/mdoc/Bl/column.out_ascii b/regress/usr.bin/mandoc/mdoc/Bl/column.out_ascii index e9d90cfe277..b934e2d8623 100644 --- a/regress/usr.bin/mandoc/mdoc/Bl/column.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Bl/column.out_ascii @@ -8,6 +8,10 @@ DDEESSCCRRIIPPTTIIOONN a b + a b cc + a b cc + a b cc + a b cc a b cc a b cc d @@ -48,4 +52,4 @@ DDEESSCCRRIIPPTTIIOONN a b cde aa bb cc dd -OpenBSD December 24, 2009 OpenBSD +OpenBSD December 13, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Bl/column.out_lint b/regress/usr.bin/mandoc/mdoc/Bl/column.out_lint index 5f971087c6b..c6e80a0eecb 100644 --- a/regress/usr.bin/mandoc/mdoc/Bl/column.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Bl/column.out_lint @@ -1,4 +1,4 @@ -mandoc: column.in:67:2: ERROR: argument count wrong: columns == 2 (have 1) -mandoc: column.in:70:2: ERROR: argument count wrong: columns == 2 (have 4) -mandoc: column.in:71:2: ERROR: argument count wrong: columns == 2 (have 5) -mandoc: column.in:74:25: WARNING: skipping -width argument: Bl -column +mandoc: column.in:71:2: ERROR: argument count wrong: columns == 2 (have 1) +mandoc: column.in:74:2: ERROR: argument count wrong: columns == 2 (have 4) +mandoc: column.in:75:2: ERROR: argument count wrong: columns == 2 (have 5) +mandoc: column.in:78:25: WARNING: skipping -width argument: Bl -column diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index a7adb9f26d3..b71a1fbc4e1 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_macro.c,v 1.112 2014/11/30 05:28:00 schwarze Exp $ */ +/* $OpenBSD: mdoc_macro.c,v 1.113 2014/12/13 13:13:26 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze @@ -670,11 +670,9 @@ macro_or_word(MACRO_PROT_ARGS, int parsed) p = buf + ppos; ntok = MDOC_MAX; - if (mdoc->flags & MDOC_PHRASELIT) - /* nothing */; - else if (*p == '"') + if (*p == '"') p++; - else if (parsed) + else if (parsed && ! (mdoc->flags & MDOC_PHRASELIT)) ntok = lookup(mdoc, tok, line, ppos, p); if (ntok == MDOC_MAX) {