Closed str4d closed 11 months ago
I think the bug is here: https://github.com/mmarkdown/mmark/blob/3d25d9375c96315e75624f8f5b9d814d870e35fe/mparser/bibliography.go#L196-L216
If (norm != nil) && (inform != nil)
, a wrapping References
section should be appended to where
, and norm / inform
should be appended to that.
With the commit above (in #199), the Markdown from the OP renders as:
<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<section anchor="introduction"><name>Introduction</name>
<t>Normative: <xref target="RFC2119"></xref></t>
<t>Informative: <xref target="RFC7748"></xref></t>
</section>
</middle>
<back>
<references><name>References</name>
<references><name>Normative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
</references>
<references><name>Informative References</name>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7748.xml"/>
</references>
</references>
</back>
which is exactly the change that the RFC Editor made to the ID in question.
What went wrong?
One of the editorial changes that the RFC Editor made to an ID's XML generated from
mmark
was to make the normative and informative references subsections of aReferences
section, to match the RFC style guide.mmark
should perform this nesting itself when both normative and informative references are present.What version of mmark are you using?
2.2.36
What is the most minimal markdown snippets that shows the problem?
generates: