From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 09fa1a84 for ; Sat, 5 Jan 2019 16:55:14 -0500 (EST) Date: Sat, 5 Jan 2019 16:55:14 -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: In no-fill mode, avoid bogus blank lines in two situations: 1. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <05f9b1bf8dc221e1@fantadrom.bsd.lv> Log Message: ----------- In no-fill mode, avoid bogus blank lines in two situations: 1. After the last child; the parent will take care of the line break. 2. At the .YS macro; the end of the preceding .SY already broke the line. Modified Files: -------------- mandoc: man_html.c mandoc/regress/man/SY: Makefile Added Files: ----------- mandoc/regress/man/SY: literal.out_html Revision Data ------------- Index: man_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/man_html.c,v retrieving revision 1.164 retrieving revision 1.165 diff -Lman_html.c -Lman_html.c -u -p -r1.164 -r1.165 --- man_html.c +++ man_html.c @@ -256,8 +256,8 @@ print_man_node(MAN_ARGS) /* This will automatically close out any font scope. */ print_stagq(h, t); - if (n->flags & NODE_NOFILL && - (n->next == NULL || n->next->flags & NODE_LINE)) { + if (n->flags & NODE_NOFILL && n->tok != MAN_YS && + (n->next != NULL && n->next->flags & NODE_LINE)) { /* In .nf =
, print even empty lines. */
 		h->col++;
 		print_endline(h);
--- /dev/null
+++ regress/man/SY/literal.out_html
@@ -0,0 +1,31 @@
+BEGINTEST
+
+initial regular text + + + + + +
commandarguments
+middle regular text +
+literal text
+before display
+
+ + + + + +
command +
+arguments
+    
+
+
+literal text
+after display
+
+final regular text +
+ENDTEST Index: Makefile =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/man/SY/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -Lregress/man/SY/Makefile -Lregress/man/SY/Makefile -u -p -r1.1 -r1.2 --- regress/man/SY/Makefile +++ regress/man/SY/Makefile @@ -1,5 +1,6 @@ -# $OpenBSD: Makefile,v 1.1 2019/01/05 21:13:55 schwarze Exp $ +# $OpenBSD: Makefile,v 1.2 2019/01/05 21:52:57 schwarze Exp $ REGRESS_TARGETS = literal +HTML_TARGETS = literal .include -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv