Closed b---c closed 4 years ago
[ Quoting notifications@github.com in "[mmarkdown/mmark] truly "compact" l..." ]
Lots of details follow but in summary I think my question is this: is there some directive or markdown or formatting trick that would result in the
<t>
elements being omitted from the various list<dd>
and<li>
items in the XML produced from mmark? Or is there a bug or feature request in here somewhere? Or is this an unavoidable loss of fidelity as conversion happens between a myriad of formats? Or perhaps I'm way off in the weeds with this whole thing... ?
Hmm, I see that https://tools.ietf.org/html/rfc7991#section-2.29 indeed allows this, the
intent being that if there isn't any block level elements you don't need to insert
Thanks for the quick response!
Lots of details follow but in summary I think my question is this: is there some directive or markdown or formatting trick that would result in the
<t>
elements being omitted from the various list<dd>
and<li>
items in the XML produced from mmark? Or is there a bug or feature request in here somewhere? Or is this an unavoidable loss of fidelity as conversion happens between a myriad of formats? Or perhaps I'm way off in the weeds with this whole thing... ?Using mmark 2.2.3 with no CLI options on Mac to produce the XML for an IETF WG document, which is here: https://github.com/oauthstuff/draft-oauth-par and specifially I ran into this trying to make the IANA section look tidy https://www.ietf.org/id/draft-ietf-oauth-par-01.html#name-iana-considerations by grouping the definition list closer together.
I would sometimes like to use compact lists (
<dl>
,<ol>
and<ul>
with thespacing="compact"
attribute) in IETF drafts 'cause I think they just look better in certain curemstances.Using
{spacing="compact"}
in the markdown does result in thespacing="compact"
attribute in the XML element as expected. And this produces the desired outcome in the text format out of xml2rfc (2.40.0). The HTML out of xml2rfc hascompact
added to theclass
of the<ol>
anddlCompact
toclass
of the<dl>
. But curiously does nothing different on the<ul>
, which is perhaps an issue with xml2rfc. Visually theclass="compact"
on the<ol>
does seem to compress things a little bit but otherwise thespacing="compact"
appears to have no ultimate effect on the HTML.All of the content of the
<dd>
and<li>
elements in the XML out of mmark are wrapped in a<t>
and that in turn results in the content being inside<p>
elements in xml2rfc's HTML. Those<p>
elements on each item result in extra space between items and lists that don't look very compact at all.Here's a screen shot of the rendered HTML without the
{spacing="compact"}
in the original markdown:Here's a screen shot of the rendered HTML with the
{spacing="compact"}
in the original markdown:Here's a markdown snippet I've been using to testing (with and without the three
{spacing="compact"}
):Removing the seemingly extraneous
<t>
elements from the XML produced by mmark and running that though xml2rfc gives more compact lists:Although it also somewhat compacts normal lists too: