jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.57k stars 3.38k forks source link

Markdown writer: escape link to avoid interpretation as a citation #3626

Open davidar opened 7 years ago

davidar commented 7 years ago
% pandoc -v
pandoc 2.0
Compiled with pandoc-types 1.17.0.5, texmath 0.9.4, skylighting 0.3.3

% pandoc -f html -t markdown
<a href="foo">@bar</a>
^D
[@bar](foo)

% pandoc -f html -t markdown | pandoc
<a href="foo">@bar</a>
^D
<p><span class="citation" data-cites="bar">[@bar]</span>(foo)</p>

cc #3619

Edit: There's also a similar problem with footnotes:

% pandoc -f html -t markdown-superscript | pandoc
<a href="foo">^bar</a>
^D
<p>[^bar](foo)</p>
jgm commented 5 years ago

I guess the desired output would be:

[\@bar](foo)

[\^bar](foo)

Right?