summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.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
commitbf9cd278f0762f5462721f4edb03b4172663d23f (patch)
tree039daf4f957a0b2ddd6adf6b1082739bf927cb6c /mdoc_html.c
parent15176c550e36917edca474cf54bf81fdcd5cc066 (diff)
downloadmandoc-bf9cd278f0762f5462721f4edb03b4172663d23f.tar.gz
mandoc-bf9cd278f0762f5462721f4edb03b4172663d23f.tar.zst
mandoc-bf9cd278f0762f5462721f4edb03b4172663d23f.zip
If the first character of free-form text is whitespace, then a newline
shall precede outputted text (surprise!).
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 44b41d2f..b2a421bd 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.142 2011/01/07 13:20:58 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.143 2011/01/12 10:43:22 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -420,6 +420,8 @@ print_mdoc_node(MDOC_ARGS)
child = mdoc_root_pre(m, n, h);
break;
case (MDOC_TEXT):
+ if (' ' == *n->string && MDOC_LINE & n->flags)
+ print_otag(h, TAG_BR, 0, NULL);
print_text(h, n->string);
return;
case (MDOC_TBL):