summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-09-26 18:23:55 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-09-26 18:23:55 +0000
commit12886a63affd2596f6df003f827e5ae36b4fc5fd (patch)
treed3278f6de53c2c592dfce19e23bf75ad833e2977 /usr.bin/mandoc/mdoc_term.c
parenta71269025734e298edd832b1e9850d0bf547e162 (diff)
no punctuation after .%* outside .Rs
in .Rs, mark full stops after .%* as end of a sentence from kristaps@
Diffstat (limited to 'usr.bin/mandoc/mdoc_term.c')
-rw-r--r--usr.bin/mandoc/mdoc_term.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index 04b2e8b0709..ef5c69491db 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.105 2010/09/23 20:39:13 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.106 2010/09/26 18:23:54 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -2126,8 +2126,14 @@ termp____post(DECL_ARGS)
/* TODO: %U. */
- p->flags |= TERMP_NOSPACE;
- term_word(p, n->next ? "," : ".");
+ if (NULL == n->parent || MDOC_Rs != n->parent->tok)
+ return;
+
+ if (NULL == n->next) {
+ term_word(p, ".");
+ p->flags |= TERMP_SENTENCE;
+ } else
+ term_word(p, ",");
}