From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id c486a693 for ; Thu, 5 Sep 2019 08:35:34 -0500 (EST) Date: Thu, 5 Sep 2019 08:35:34 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Do not clear HTML_NOSPACE in print_indent(). X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <862a9a99893a70b5@mandoc.bsd.lv> Log Message: ----------- Do not clear HTML_NOSPACE in print_indent(). I don't think there ever was a reason for doing so. Besides, there is a discrepacy with respect to the point in the document affected. That flag controls whitespace at the current formatting point. But when HTML_BUFFER is in effect, the line break and indentation is typically inserted one word further to the left. Anything happening at that point to the left can't reasonably influence spacing at the different point further to the right. Among other effects, this change avoids some spurious line breaks in HTML code at points where they weren't supposed to happen, line breaks that in some cases caused undesirable, visible whitespace when the resulting HTML was rendered. Modified Files: -------------- mandoc: html.c Revision Data ------------- Index: html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/html.c,v retrieving revision 1.260 retrieving revision 1.261 diff -Lhtml.c -Lhtml.c -u -p -r1.260 -r1.261 --- html.c +++ html.c @@ -968,15 +968,12 @@ print_indent(struct html *h) { size_t i; - if (h->col) + if (h->col || h->noindent) return; - if (h->noindent == 0) { - h->col = h->indent * 2; - for (i = 0; i < h->col; i++) - putchar(' '); - } - h->flags &= ~HTML_NOSPACE; + h->col = h->indent * 2; + for (i = 0; i < h->col; i++) + putchar(' '); } /* -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv