summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2019-09-03 15:09:39 +0000
committerschwarze <schwarze@openbsd.org>2019-09-03 15:09:39 +0000
commitfaccc66222e1f9e393ce58ee5e3f25c4a0d15640 (patch)
treebe97377edd7992cfb19c220b14eb6ea9c2b3daf6 /usr.bin/mandoc/mdoc_html.c
parentonly need one start: label; ok kettenis (diff)
downloadwireguard-openbsd-faccc66222e1f9e393ce58ee5e3f25c4a0d15640.tar.xz
wireguard-openbsd-faccc66222e1f9e393ce58ee5e3f25c4a0d15640.zip
Format .Nd with more logically with <span> rather than <div>; after all,
it is supposed to be a one-line description. For the case where .Nd generates flow content (which is very bad style but syntactically valid), rely on the new feature of html_close_paragraph() to close out the <span> prematurely, effectively moving the flow content out of the .Nd for HTML presentation. For the final closing, also rely on the new html_close_paragraph() functionality, this time triggered by the subsequent block, which will typically be .Sh SYNOPSIS.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index f44f6fa79d0..e934d02e855 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_html.c,v 1.204 2019/09/01 15:12:03 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.205 2019/09/03 15:09:39 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -651,7 +651,6 @@ mdoc_nd_pre(MDOC_ARGS)
{
switch (n->type) {
case ROFFT_BLOCK:
- html_close_paragraph(h);
return 1;
case ROFFT_HEAD:
return 0;
@@ -661,8 +660,7 @@ mdoc_nd_pre(MDOC_ARGS)
abort();
}
print_text(h, "\\(em");
- /* Cannot use TAG_SPAN because it may contain blocks. */
- print_otag(h, TAG_DIV, "c", "Nd");
+ print_otag(h, TAG_SPAN, "c", "Nd");
return 1;
}