* mandoc: Input lines that are not blank but generate no output, for
@ 2018-10-23 17:18 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-10-23 17:18 UTC (permalink / raw)
To: source
Log Message:
-----------
Input lines that are not blank but generate no output,
for example lines containing nothing but "\&", are significant
in no-fill mode and can be represented by blank lines inside <pre>.
Fixing a bug that Pali dot Rohar at gmail dot com found
in pod2man(1) output, for example Email::Address::XS(3p).
While here, inside no-fill mode, there is no need to encode
totally blank input lines by emulating .PP - just let them
through as we are inside <pre> anyway.
Modified Files:
--------------
mandoc:
man_html.c
Revision Data
-------------
Index: man_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/man_html.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -Lman_html.c -Lman_html.c -u -p -r1.156 -r1.157
--- man_html.c
+++ man_html.c
@@ -264,7 +264,7 @@ print_man_node(MAN_ARGS)
n->flags & NODE_LINE && *n->string == ' ' &&
(h->flags & HTML_NONEWLINE) == 0)
print_otag(h, TAG_BR, "");
- if (*n->string != '\0')
+ if (want_fillmode == MAN_nf || *n->string != '\0')
break;
print_paragraph(h);
return;
@@ -338,8 +338,11 @@ print_man_node(MAN_ARGS)
print_stagq(h, t);
if (fillmode(h, 0) == MAN_nf &&
- n->next != NULL && n->next->flags & NODE_LINE)
+ n->next != NULL && n->next->flags & NODE_LINE) {
+ /* In .nf = <pre>, print even empty lines. */
+ h->col++;
print_endline(h);
+ }
}
/*
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-10-23 17:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 17:18 mandoc: Input lines that are not blank but generate no output, for schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).