summaryrefslogtreecommitdiffstats
path: root/roff_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-03 16:18:02 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-03 16:18:02 +0000
commitb612c0fc16de6270d13910388974b03b6bf27af8 (patch)
tree3e15ac2ce16ca51eefce92083d7203da7c767615 /roff_html.c
parente5140f43307c76be9f8559136c9ee94b15bd5fab (diff)
downloadmandoc-b612c0fc16de6270d13910388974b03b6bf27af8.tar.gz
Render .br as <br/>, not as an empty <div>.
The element <br/> was already employed for many other purposes, so there is nothing wrong with using it. Also, it is safer because <br/> is permitted in phrasing content, whereas <div> is only allowed in flow content. This is the first part of the HTML syntax audit which i wanted to do for a long time. Reminded by a loosely related bug report from Mark Harris <mark dot hsj at gmail dot com>. Examples of where this caused HTML nesting syntax errors: * in man(7) code between .nf and .fi * in mdoc(7) code between .Bd -unfilled and .Ed * in mdoc(7) code between .Ql Xo and .Xc * in mdoc(7) code between .Rs and .Re
Diffstat (limited to 'roff_html.c')
-rw-r--r--roff_html.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/roff_html.c b/roff_html.c
index 7395916c..a9255b02 100644
--- a/roff_html.c
+++ b/roff_html.c
@@ -58,11 +58,7 @@ roff_html_pre(struct html *h, const struct roff_node *n)
static void
roff_html_pre_br(ROFF_HTML_ARGS)
{
- struct tag *t;
-
- t = print_otag(h, TAG_DIV, "");
- print_text(h, "\\~"); /* So the div isn't empty. */
- print_tagq(h, t);
+ print_otag(h, TAG_BR, "");
}
static void