mmarkdown / mmark

Mmark: a powerful markdown processor in Go geared towards the IETF
https://mmark.miek.nl
Other
480 stars 45 forks source link

Do not render `<area>` element from IRTF documents #213

Closed str4d closed 11 months ago

str4d commented 11 months ago

What went wrong?

The <area> element is always rendered in the title block: https://github.com/mmarkdown/mmark/blob/3944c1c00c36aa11468fcc21f32410f920be3463/render/xml/title.go#L94

If the Markdown file does not set an area, it defaults to "Internet": https://github.com/mmarkdown/mmark/blob/3944c1c00c36aa11468fcc21f32410f920be3463/mast/title.go#L17-L20

However, the RFC Editor has informed me that:

For IRTF documents, we include <workgroup>, set to the RG name without the words "Research Group”. We do not include <area>.

mmark should not render <area> for IRTF documents. It should also probably require that the workgroup item is set (with the requisite format) in the title block.

What version of mmark are you using?

2.2.39

What is the most minimal markdown snippets that shows the problem?

%%%
    title = "Foobar"
    submissionType = "IRTF"

    [seriesInfo]
    name = "Internet-Draft"
    value = "foobar"
    stream = "IRTF"
    status = "informational"
%%%

renders to:

<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc version="3" ipr="trust200902" docName="foobar" submissionType="IRTF" category="info" xml:lang="en" xmlns:xi="http://www.w3.org/2001/XInclude" indexInclude="true">

<front>
<title>Foobar</title><seriesInfo value="foobar" stream="IRTF" status="informational" name="Internet-Draft"></seriesInfo>
<date/>
<area>Internet</area>
<workgroup></workgroup>

</front>

</rfc>
miekg commented 11 months ago

does area = "" work here? Then I'll update the FAQ and don't need to change the default for I-Ds and RFC (that would be breaking change)

I don't want to detect document formats/stream, as this is also underspecified and might change in the future.

Area set to the empty string results in <area></area> which should be fine?

miekg commented 11 months ago

this one is closed via c915b8d

str4d commented 11 months ago

Area set to the empty string results in <area></area> which should be fine?

I confirmed this to be the case locally (and also confirmed that neither <area>Internet</area> nor <area></area> show up in the text or HTML renderings form xml2rfc), but I'm now past the point where I can get confirmation from the RFC Editor of whether this would be fine. I would presume so however (and if not, it can be up to the next person to use mmark for an I-D to figure that out).