summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-12 10:43:22 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-12 10:43:22 +0000
commit2bf82dba54d0ddc4e85c60a1627506ced02908f0 (patch)
treea82dabc3e5509d2cd4a383b5799e38c3a7615bbd /man_term.c
parentd184f91df1cea2fba0dbd3f880de0a6e9f7b84ac (diff)
downloadmandoc-2bf82dba54d0ddc4e85c60a1627506ced02908f0.tar.gz
If the first character of free-form text is whitespace, then a newline
shall precede outputted text (surprise!).
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/man_term.c b/man_term.c
index 29148d65..2aab8277 100644
--- a/man_term.c
+++ b/man_term.c
@@ -859,10 +859,13 @@ print_man_node(DECL_ARGS)
switch (n->type) {
case(MAN_TEXT):
- if (0 == *n->string) {
+ if ('\0' == *n->string) {
term_vspace(p);
break;
- }
+ }
+
+ if (' ' == *n->string && MAN_LINE & n->flags)
+ term_newln(p);
term_word(p, n->string);
@@ -878,6 +881,7 @@ print_man_node(DECL_ARGS)
p->rmargin = rm;
p->maxrmargin = rmax;
}
+
break;
case (MAN_TBL):
if (TBL_SPAN_FIRST & n->span->flags)