From 45818c0e8a316cf11a8010b653ee441f7046b180 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 4 May 2010 23:13:55 +0000 Subject: 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) --- usr.bin/mandoc/mdoc.c | 9 ++++++--- 1 file 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 * @@ -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++; -- cgit v1.2.3