aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit7dafcd45448dcfc60d787b6b2c65402de8655dfe (patch)
treedef7813d11ba8d9c19bc1eff62b0083088f63445 /mdoc_term.c
parentb9fc71aac852498754fbbda329b8f94f6aad2d55 (diff)
downloadmandoc-7dafcd45448dcfc60d787b6b2c65402de8655dfe.tar.gz
mandoc-7dafcd45448dcfc60d787b6b2c65402de8655dfe.tar.zst
mandoc-7dafcd45448dcfc60d787b6b2c65402de8655dfe.zip
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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 57cf41ac..6181cb87 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.179 2010/07/27 08:38:04 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.180 2010/08/07 17:11:17 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;