summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--mdoc_html.c13
-rw-r--r--mdoc_term.c12
2 files changed, 9 insertions, 16 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index f109bd69..5bd4c014 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.99 2010/07/23 00:08:57 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.100 2010/07/27 08:38:04 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -1457,14 +1457,11 @@ mdoc_bd_pre(MDOC_ARGS)
print_otag(h, TAG_DIV, 2, tag);
for (nn = n->child; nn; nn = nn->next) {
- h->flags |= HTML_NOSPACE;
- print_mdoc_node(m, nn, h);
- if (NULL == nn->next)
- continue;
- if (nn->prev && nn->prev->line < nn->line)
- print_text(h, "\n");
- else if (NULL == nn->prev)
+ if (nn->prev && nn->prev->line < nn->line) {
print_text(h, "\n");
+ h->flags |= HTML_NOSPACE;
+ }
+ print_mdoc_node(m, nn, h);
}
return(0);
diff --git a/mdoc_term.c b/mdoc_term.c
index 1941e07c..57cf41ac 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.178 2010/07/26 22:35:59 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.179 2010/07/27 08:38:04 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -1621,8 +1621,7 @@ termp_fa_pre(DECL_ARGS)
static int
termp_bd_pre(DECL_ARGS)
{
- size_t tabwidth;
- size_t rm, rmax;
+ size_t tabwidth, rm, rmax;
const struct mdoc_node *nn;
if (MDOC_BLOCK == n->type) {
@@ -1654,12 +1653,9 @@ termp_bd_pre(DECL_ARGS)
p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
for (nn = n->child; nn; nn = nn->next) {
- p->flags |= TERMP_NOSPACE;
+ if (nn->prev && nn->prev->line < nn->line)
+ term_newln(p);
print_mdoc_node(p, pair, m, nn);
- if (NULL == nn->prev ||
- nn->prev->line < nn->line ||
- NULL == nn->next)
- term_flushln(p);
}
p->tabwidth = tabwidth;