source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* docbook2mdoc: do not emit .Em or .Fl right before another macro
@ 2019-04-14 19:30 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2019-04-14 19:30 UTC (permalink / raw)
  To: source

Log Message:
-----------
do not emit .Em or .Fl right before another macro

Modified Files:
--------------
    docbook2mdoc:
        docbook2mdoc.c
        statistics.c

Revision Data
-------------
Index: docbook2mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -Ldocbook2mdoc.c -Ldocbook2mdoc.c -u -p -r1.122 -r1.123
--- docbook2mdoc.c
+++ docbook2mdoc.c
@@ -1083,7 +1083,9 @@ pnode_print(struct format *f, struct pno
 	case NODE_EMPHASIS:
 	case NODE_FIRSTTERM:
 	case NODE_GLOSSTERM:
-		macro_open(f, "Em");
+		if ((nc = TAILQ_FIRST(&n->childq)) != NULL &&
+		    pnode_class(nc->node) < CLASS_LINE)
+			macro_open(f, "Em");
 		break;
 	case NODE_ENVAR:
 		macro_open(f, "Ev");
@@ -1156,7 +1158,9 @@ pnode_print(struct format *f, struct pno
 		pnode_printmath(f, n);
 		break;
 	case NODE_OPTION:
-		macro_open(f, "Fl");
+		if ((nc = TAILQ_FIRST(&n->childq)) != NULL &&
+		    pnode_class(nc->node) < CLASS_LINE)
+			macro_open(f, "Fl");
 		break;
 	case NODE_ORDEREDLIST:
 		pnode_printlist(f, n);
Index: statistics.c
===================================================================
RCS file: /home/cvs/mdocml/docbook2mdoc/statistics.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lstatistics.c -Lstatistics.c -u -p -r1.28 -r1.29
--- statistics.c
+++ statistics.c
@@ -418,6 +418,8 @@ main(int argc, char *argv[])
 		table_add("editor", "firstname");
 		table_add("editor", "surname");
 		table_add("email", "TEXT");
+		table_add("emphasis", "errorname");
+		table_add("emphasis", "function");
 		table_add("emphasis", "TEXT");
 		table_add("entry", NULL);
 		table_add("errorname", "TEXT");
@@ -431,6 +433,7 @@ main(int argc, char *argv[])
 		table_add("funcsynopsis", "funcprototype");
 		table_add("funcsynopsis", "funcsynopsisinfo");
 		table_add("funcsynopsisinfo", "TEXT");
+		table_add("function", "replaceable");
 		table_add("function", "TEXT");
 		table_add("glossary", "glossdiv");
 		table_add("glossary", "glossentry");
@@ -459,6 +462,8 @@ main(int argc, char *argv[])
 		table_add("markup", "TEXT");
 		table_add("member", "TEXT");
 		table_add("note", NULL);
+		table_add("option", "parameter");
+		table_add("option", "replaceable");
 		table_add("option", "TEXT");
 		table_add("orderedlist", "listitem");
 		table_add("orgdiv", "TEXT");
@@ -483,6 +488,7 @@ main(int argc, char *argv[])
 		table_add("programlisting", NULL);
 		table_add("property", "TEXT");
 		table_add("pubdate", "TEXT");
+		table_add("quote", "command");
 		table_add("quote", "literal");
 		table_add("quote", "TEXT");
 		table_add("refentry", "refentryinfo");
@@ -536,6 +542,14 @@ main(int argc, char *argv[])
 		table_add("tgroup", "tbody");
 		table_add("tgroup", "thead");
 		table_add("thead", "row");
+		table_add("title", "acronym");
+		table_add("title", "emphasis");
+		table_add("title", "errorname");
+		table_add("title", "function");
+		table_add("title", "literal");
+		table_add("title", "quote");
+		table_add("title", "trademark");
+		table_add("title", "type");
 		table_add("title", "TEXT");
 		table_add("trademark", "TEXT");
 		table_add("type", "TEXT");
--
 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-04-14 19:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-14 19:30 docbook2mdoc: do not emit .Em or .Fl right before another macro 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).