diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-09-26 18:23:55 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-09-26 18:23:55 +0000 |
commit | 12886a63affd2596f6df003f827e5ae36b4fc5fd (patch) | |
tree | d3278f6de53c2c592dfce19e23bf75ad833e2977 /usr.bin | |
parent | a71269025734e298edd832b1e9850d0bf547e162 (diff) |
no punctuation after .%* outside .Rs
in .Rs, mark full stops after .%* as end of a sentence
from kristaps@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 15 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 12 |
2 files changed, 16 insertions, 11 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index 64d69ec1f26..0cd777ab8cd 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.30 2010/09/20 20:02:27 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.31 2010/09/26 18:23:54 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -2104,17 +2104,14 @@ static int mdoc_rs_pre(MDOC_ARGS) { struct htmlpair tag; - struct roffsu su; if (MDOC_BLOCK != n->type) return(1); if (n->prev && SEC_SEE_ALSO == n->sec) { - SCALE_VS_INIT(&su, 1); - bufcat_su(h, "margin-top", &su); - PAIR_STYLE_INIT(&tag, h); - print_otag(h, TAG_DIV, 1, &tag); - } + print_otag(h, TAG_BR, 0, NULL); + print_otag(h, TAG_BR, 0, NULL); + } PAIR_CLASS_INIT(&tag, "ref"); print_otag(h, TAG_SPAN, 1, &tag); @@ -2262,7 +2259,9 @@ mdoc__x_post(MDOC_ARGS) /* TODO: %U */ - h->flags |= HTML_NOSPACE; + if (NULL == n->parent || MDOC_Rs != n->parent->tok) + return; + print_text(h, n->next ? "," : "."); } 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, ","); } |