summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_argv.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-03-02 00:13:58 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-03-02 00:13:58 +0000
commit56342f8fd286788a0d8a3cb303eb2e462abdce6f (patch)
treedd0d3d1a770a82d846c9fd5a661b88bd25d943dc /usr.bin/mandoc/mdoc_argv.c
parent69e26d6eaf0e15c89509d539c529b0e02f715d7c (diff)
Distinguish opening and closing delimiters, and close out block
macros after closing delimiters only, not after opening ones. Besides, neither roff nor old nor new groff consider braces { } as delimiters. This fixes some frequent misrenderings by mandoc, for example ".Ql (" being rendered as "`'(" instead of "`('".
Diffstat (limited to 'usr.bin/mandoc/mdoc_argv.c')
-rw-r--r--usr.bin/mandoc/mdoc_argv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_argv.c b/usr.bin/mandoc/mdoc_argv.c
index 0b4f4c7c918..c1aac1c1c86 100644
--- a/usr.bin/mandoc/mdoc_argv.c
+++ b/usr.bin/mandoc/mdoc_argv.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_argv.c,v 1.19 2009/12/22 23:58:00 schwarze Exp $ */
+/* $Id: mdoc_argv.c,v 1.20 2010/03/02 00:13:57 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -397,9 +397,9 @@ args(struct mdoc *m, int line, int *pos,
* follows the pattern of [[::delim::][ ]+]+.
*/
- if ((fl & ARGS_DELIM) && mdoc_iscdelim(buf[*pos])) {
+ if ((fl & ARGS_DELIM) && mdoc_iscdelim(buf[*pos]) > 1) {
for (i = *pos; buf[i]; ) {
- if ( ! mdoc_iscdelim(buf[i]))
+ if ( mdoc_iscdelim(buf[i]) < 2)
break;
i++;
if (0 == buf[i] || ' ' != buf[i])