tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* [PATCH docbook2mdoc] Add NODE_SIMPARA
@ 2019-04-06  9:33 Stephen Gregoratto
  2019-04-06 13:51 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Gregoratto @ 2019-04-06  9:33 UTC (permalink / raw)
  To: tech

From the spec:

> A simpara is a "simple paragraph," one that may contain only
> character data and inline elements.

  <simpara>
  Just the text, ma'am.
  </simpara>

Since we don't care about validation, treat it the same as <para>.

Index: docbook2mdoc.c
===================================================================
RCS file: /cvs/docbook2mdoc/docbook2mdoc.c,v
retrieving revision 1.91
diff -u -p -r1.91 docbook2mdoc.c
--- docbook2mdoc.c	3 Apr 2019 18:52:40 -0000	1.91
+++ docbook2mdoc.c	6 Apr 2019 09:24:49 -0000
@@ -764,6 +764,7 @@ pnode_print(struct format *p, struct pno
 		pnode_printlist(p, pn);
 		break;
 	case NODE_PARA:
+	case NODE_SIMPARA:
 		pnode_printpara(p, pn);
 		break;
 	case NODE_PARAMDEF:
Index: node.h
===================================================================
RCS file: /cvs/docbook2mdoc/node.h,v
retrieving revision 1.9
diff -u -p -r1.9 node.h
--- node.h	3 Apr 2019 17:53:02 -0000	1.9
+++ node.h	6 Apr 2019 09:24:49 -0000
@@ -121,6 +121,7 @@ enum	nodeid {
 	NODE_SCREEN,
 	NODE_SECTION,
 	NODE_SGMLTAG,
+	NODE_SIMPARA,
 	NODE_SIMPLELIST,
 	NODE_SPANSPEC,
 	NODE_SUBTITLE,
Index: parse.c
===================================================================
RCS file: /cvs/docbook2mdoc/parse.c,v
retrieving revision 1.14
diff -u -p -r1.14 parse.c
--- parse.c	5 Apr 2019 14:37:36 -0000	1.14
+++ parse.c	6 Apr 2019 09:24:49 -0000
@@ -170,6 +170,7 @@ static	const struct element elements[] =
 	{ "sect2",		NODE_SECTION },
 	{ "section",		NODE_SECTION },
 	{ "sgmltag",		NODE_SGMLTAG },
+	{ "simpara",		NODE_SIMPARA },
 	{ "simplelist",		NODE_SIMPLELIST },
 	{ "spanspec",		NODE_SPANSPEC },
 	{ "structfield",	NODE_PARAMETER },
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-06 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-06  9:33 [PATCH docbook2mdoc] Add NODE_SIMPARA Stephen Gregoratto
2019-04-06 13:51 ` Ingo 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).