mmarkdown / mmark

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

Spurious [] before cross-references #29

Closed fanf2 closed 6 years ago

fanf2 commented 6 years ago

What went wrong?

With a long-form xref like the XML output is

[]<xref target="RFC2119"></xref>

and the HTML is

[]<a href="#RFC2119"></a>

I expected no [] in the output.

What version of mmark are you using?

2.0.10

What command line did you use?

echo '[](#RFC2119)' >xref.md
~/go/bin/mmark xref.md

What platform (Linux/Apple/Windows)?

miekg commented 6 years ago

ah. that looks like an easy fix

miekg commented 6 years ago

ah, you're holding it wrong, it should just be (#RFC2119). But this should lead to some improvements in docs; what do you want to do?

fanf2 commented 6 years ago

Well, it seems that what I actually wanted was [@!RFC2119] which causes the right XML declarations to be included. I was led astray by converting a draft written using the Pandoc setup. But I think the [](#thing) syntax ought to work the same with mmark as with pandoc, e.g. in case of explicit <reference> sections.

miekg commented 6 years ago

I'm not in favor (yet) to add more syntax. Even with a <reference> to cite it you need a variant [@....].