tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: Stephen Gregoratto <dev@sgregoratto.me>
Cc: tech@mandoc.bsd.lv
Subject: Re: [PATCH docbook2mdoc] Add NODE_SIMPARA
Date: Sat, 6 Apr 2019 15:51:42 +0200	[thread overview]
Message-ID: <20190406135142.GB31475@athene.usta.de> (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.

Thanks,
  Ingo


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

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

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 tech+unsubscribe@mandoc.bsd.lv

      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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20190406135142.GB31475@athene.usta.de \
    --to=schwarze@usta.de \
    --cc=dev@sgregoratto.me \
    --cc=tech@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).