From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-01.scc.kit.edu (scc-mailout-kit-01.scc.kit.edu [129.13.231.81]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 9772900a for ; Mon, 3 Dec 2018 11:30:14 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-01.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1gTr6q-0005LA-8L; Mon, 03 Dec 2018 17:30:13 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1gTr6p-0003Rh-Mv; Mon, 03 Dec 2018 17:30:11 +0100 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1gTr6o-00019O-Gt; Mon, 03 Dec 2018 17:30:11 +0100 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id e54c0517; Mon, 3 Dec 2018 17:30:10 +0100 (CET) Date: Mon, 3 Dec 2018 17:30:10 +0100 From: Ingo Schwarze To: Mark Harris Cc: discuss@mandoc.bsd.lv Subject: Re: .br vertical spacing in html output Message-ID: <20181203163010.GA92067@athene.usta.de> References: X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) Hi Mark, Mark Harris wrote on Sat, Dec 01, 2018 at 01:31:05PM -0800: > With -Thtml, with or without -Ostyle=mandoc.css, a roff .br (line break) > directive is producing a large vertical space between lines. This is > unexpected and does not occur with -Tascii/utf8. Here is an example: [...] > .br > Beta The first commit in the context of the HTML syntax audit already reduced the spacing a bit, see below. There is still a spurious blank line, though, and more is also needed to prevent bad nesting in other situations. Yours, Ingo Log Message: ----------- 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 Modified Files: -------------- mandoc: roff_html.c Revision Data ------------- Index: roff_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/roff_html.c,v retrieving revision 1.12 retrieving revision 1.13 diff -Lroff_html.c -Lroff_html.c -u -p -r1.12 -r1.13 --- roff_html.c +++ roff_html.c @@ -58,11 +58,7 @@ roff_html_pre(struct html *h, const stru 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 -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv