summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man_html.c4
-rw-r--r--regress/man/SY/Makefile3
-rw-r--r--regress/man/SY/literal.out_html31
3 files changed, 35 insertions, 3 deletions
diff --git a/man_html.c b/man_html.c
index b3545216..85933113 100644
--- a/man_html.c
+++ b/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 = <pre>, print even empty lines. */
h->col++;
print_endline(h);
diff --git a/regress/man/SY/Makefile b/regress/man/SY/Makefile
index 54045804..9896d9d1 100644
--- a/regress/man/SY/Makefile
+++ b/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 <bsd.regress.mk>
diff --git a/regress/man/SY/literal.out_html b/regress/man/SY/literal.out_html
new file mode 100644
index 00000000..b1f378cf
--- /dev/null
+++ b/regress/man/SY/literal.out_html
@@ -0,0 +1,31 @@
+BEGINTEST
+<br/>
+initial regular text
+<table class="Nm">
+ <tr>
+ <td><code class="Nm" title="Nm">command</code></td>
+ <td><i>arguments</i></td>
+ </tr>
+</table>
+middle regular text
+<pre>
+literal text
+before display
+</pre>
+<table class="Nm">
+ <tr>
+ <td><code class="Nm" title="Nm">command</code></td>
+ <td>
+ <pre>
+<i>arguments</i>
+ </pre>
+ </td>
+ </tr>
+</table>
+<pre>
+literal text
+after display
+</pre>
+final regular text
+<br/>
+ENDTEST