source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Format .Nd with more logically with <span> rather than <div>;
@ 2019-09-03 15:10 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-09-03 15:10 UTC (permalink / raw)
  To: source

Log Message:
-----------
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.

Modified Files:
--------------
    mandoc:
        mdoc_html.c

Revision Data
-------------
Index: mdoc_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v
retrieving revision 1.329
retrieving revision 1.330
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.329 -r1.330
--- mdoc_html.c
+++ 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;
 }
 
--
 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:[~2019-09-03 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 15:10 mandoc: Format .Nd with more logically with <span> rather than <div>; 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).