help / color / mirror / Atom feed
From: Ingo Schwarze <>
To: Stephen Gregoratto <>
Subject: Re: [PATCH docbook2mdoc] Add NODE_SIMPARA
Date: Sat, 6 Apr 2019 15:51:42 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20190406093327.66armzmidymuzi7j@BlackBox>

Hi Stephen,

Stephen Gregoratto wrote on Sat, Apr 06, 2019 at 08:33:40PM +1100:

> 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>.

That argument makes sense.

I simplified your patch before commit, though; no separate enum
constant is needed in such a case.  Also, since <simpara> is fully
handled with your patch, exclude it from the statistics; see the
committed patch below.


Log Message:
treat <simpara> just like <para>; simplified version
of a patch from Stephen Gregoratto <dev at sgregoratto dot me>

Modified Files:

Revision Data
Index: parse.c
RCS file: /home/cvs/mdocml/docbook2mdoc/parse.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lparse.c -Lparse.c -u -p -r1.14 -r1.15
--- parse.c
+++ parse.c
@@ -170,6 +170,7 @@ static	const struct element elements[] =
 	{ "sect2",		NODE_SECTION },
 	{ "section",		NODE_SECTION },
 	{ "sgmltag",		NODE_SGMLTAG },
+	{ "simpara",		NODE_PARA },
 	{ "simplelist",		NODE_SIMPLELIST },
 	{ "spanspec",		NODE_SPANSPEC },
 	{ "structfield",	NODE_PARAMETER },
Index: statistics.c
RCS file: /home/cvs/mdocml/docbook2mdoc/statistics.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lstatistics.c -Lstatistics.c -u -p -r1.13 -r1.14
--- statistics.c
+++ statistics.c
@@ -402,6 +402,7 @@ main(int argc, char *argv[])
 		table_add("sect3", NULL);
 		table_add("sect4", NULL);
 		table_add("sgmltag", "TEXT");
+		table_add("simpara", NULL);
 		table_add("simplelist", "member");
 		table_add("structfield", "TEXT");

 To unsubscribe send an email to

      reply	other threads:[~2019-04-06 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-06  9:33 Stephen Gregoratto
2019-04-06 13:51 ` Ingo Schwarze [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: [PATCH docbook2mdoc] Add NODE_SIMPARA' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).