From 17e67c5cb10de07302a0f0ad1a0da7af23788f98 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 3 Dec 2018 16:18:02 +0000 Subject: Render .br as
, not as an empty
. The element
was already employed for many other purposes, so there is nothing wrong with using it. Also, it is safer because
is permitted in phrasing content, whereas
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 . 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 --- roff_html.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'roff_html.c') diff --git a/roff_html.c b/roff_html.c index 6a06c0d8..b26d9be9 100644 --- a/roff_html.c +++ b/roff_html.c @@ -1,4 +1,4 @@ -/* $Id: roff_html.c,v 1.12 2018/06/25 14:53:58 schwarze Exp $ */ +/* $Id: roff_html.c,v 1.13 2018/12/03 16:18:02 schwarze Exp $ */ /* * Copyright (c) 2010 Kristaps Dzonsons * Copyright (c) 2014, 2017, 2018 Ingo Schwarze @@ -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 -- cgit v1.2.3-56-ge451