diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-12 10:43:22 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-12 10:43:22 +0000 |
commit | 2bf82dba54d0ddc4e85c60a1627506ced02908f0 (patch) | |
tree | a82dabc3e5509d2cd4a383b5799e38c3a7615bbd /man_html.c | |
parent | d184f91df1cea2fba0dbd3f880de0a6e9f7b84ac (diff) | |
download | mandoc-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_html.c')
-rw-r--r-- | man_html.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -197,7 +197,16 @@ print_man_node(MAN_ARGS) child = man_root_pre(m, n, mh, h); break; case (MAN_TEXT): + if ('\0' == *n->string) { + print_otag(h, TAG_P, 0, NULL); + return; + } + + if (' ' == *n->string && MAN_LINE & n->flags) + print_otag(h, TAG_BR, 0, NULL); + print_text(h, n->string); + if (MANH_LITERAL & mh->fl) print_otag(h, TAG_BR, 0, NULL); return; |