summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-08-07 17:11:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-08-07 17:11:17 +0000
commit2b7b060863eb3ae7f588f2199f0bbb55066b6bba (patch)
tree2c52b9cdf4f2dd977e65d486c58aa5f6eaffc9a4 /mdoc_term.c
parent483c2d7e6182fb91b46499f84663b5a6c08e09ab (diff)
downloadmandoc-2b7b060863eb3ae7f588f2199f0bbb55066b6bba.tar.gz
merge from OpenBSD mdoc_term.c rev. 1.100:
preserve blank lines in .Bd -literal, both in the middle and at the end of the display ok kristaps@
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index cf3caecd..40f63208 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1653,9 +1653,11 @@ termp_bd_pre(DECL_ARGS)
p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
for (nn = n->child; nn; nn = nn->next) {
- if (nn->prev && nn->prev->line < nn->line)
- term_newln(p);
print_mdoc_node(p, pair, m, nn);
+ if (nn->next && nn->next->line == nn->line)
+ continue;
+ term_flushln(p);
+ p->flags |= TERMP_NOSPACE;
}
p->tabwidth = tabwidth;