diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-09-03 15:09:44 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-09-03 15:09:44 +0000 |
commit | 96fafeeaa0c21ab33480601821d24b8f099713d6 (patch) | |
tree | e31ef0dbdbf22efb3b209bd698a28f9750edf45e | |
parent | 1554c3f90875f1f80fbb816938aa0e3b93421e43 (diff) | |
download | mandoc-96fafeeaa0c21ab33480601821d24b8f099713d6.tar.gz |
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.
-rw-r--r-- | mdoc_html.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index b91e339c..3237f9f5 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -653,7 +653,6 @@ mdoc_nd_pre(MDOC_ARGS) { switch (n->type) { case ROFFT_BLOCK: - html_close_paragraph(h); return 1; case ROFFT_HEAD: return 0; @@ -663,8 +662,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; } |