mmarkdown / mmark

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

pass along refContent within references #137

Closed dericed closed 3 years ago

dericed commented 3 years ago

In our AUTH48 review, the editors added a <refcontent> element to several of our references. When I try to backtrack and include these within the markdown such as:

      <reference anchor="ISO.9899.2018" target="">
        <front>
          <title>Information technology - Programming languages - C</title>
          <author>
            <organization>International Organization for Standardization</organization>
          </author>
          <date year="2018" month="June"/>
        </front>
        <refcontent>ISO/IEC 9899:2018</refcontent>
      </reference>

The <refcontent> is removed when the reference is passed along to the xml output. Is would be helpful to keep it and allow it to pass-through to the xml output.

dericed commented 3 years ago

Thanks, this works well, though I use grep to suppress the empty that come when there isn't one.

I also wanted to share a case where the AUTH48 editor included, two values such as:

      <reference anchor="Range-Encoding" target="">
        <front>
          <title>Range encoding: an algorithm for removing redundancy from a digitised message</title>
          <author fullname="G. N. N. Martin" initials="G. N. N." surname="Martin"/>
          <date year="1979" month="July"/>
        </front>
        <refcontent>Proceedings of the Conference on Video and Data Recording</refcontent>
        <refcontent>Institution of Electronic and Radio Engineers, Hampshire, England</refcontent>
      </reference>

See https://www.rfc-editor.org/authors/rfc9043.xml