summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-05-04 23:13:55 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-05-04 23:13:55 +0000
commit45818c0e8a316cf11a8010b653ee441f7046b180 (patch)
tree78bbb4303ddab97b136aaeed5b45b11ea2b50d11
parent9779bab9f4ee4e0e368ebb23b310635ad1c8baa3 (diff)
end-of-sentence markers at the end of .Fn argument lists
ruin indentation of the next line in the SYNOPSIS section; bug found by jacekm@ in err(3)
-rw-r--r--usr.bin/mandoc/mdoc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc.c b/usr.bin/mandoc/mdoc.c
index e4d5bec9102..374c3b81f4a 100644
--- a/usr.bin/mandoc/mdoc.c
+++ b/usr.bin/mandoc/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.42 2010/04/27 21:53:27 schwarze Exp $ */
+/* $Id: mdoc.c,v 1.43 2010/05/04 23:13:54 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -810,14 +810,17 @@ parsemacro(struct mdoc *m, int ln, char *buf)
/*
* Mark the end of a sentence, but be careful not to insert
- * markers into reference blocks.
+ * markers into reference blocks and after ellipses in
+ * function definitions.
*/
n = m->last;
if (n->child)
n = n->child;
while (n->next)
n = n->next;
- if (MDOC_TEXT == n->type && m->last->parent->tok != MDOC_Rs) {
+ if (MDOC_TEXT == n->type &&
+ MDOC_Fn != n->parent->tok &&
+ MDOC_Rs != m->last->parent->tok) {
t = n->string;
while (t[0] && t[1])
t++;