Closed
Description
reStructured replacement text in references doesn't work the same in pandoc as it
does in the docutils implementation
of reStructuredTexT.
The following example reST input, found in the reStructuredText
Directives
documentation, shows the problem.
I recommend you try |Python|_.
.. |Python| replace:: Python, *the* best language around
.. _Python: http://www.python.org/
The docutils HTML output (after
stripping the header and footer boilerplate, to match pandoc without
the -s
option) is:
<p>I recommend you try <a class="reference external" href="http://www.python.org/">Python, <em>the</em> best language around</a>.</p>
The pandoc HTML output is:
<p>I recommend you try Python, <em>the</em> best language around_.</p>
The pandoc version doesn't surround the replacement text with the
<a>…</a>
element.
I'm using the following version of Pandoc:
pandoc 2.10.1
Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5
and the following version of docutils:
rst2html.py (Docutils 0.16 [release], Python 3.8.5, on darwin)
The example html output was generated with the commands:
rst2html.py rtirdw.rst | sed '1,/^<div class="document">/d' | sed -e '1,2d' -e '\%</div>%,$d' >rtirdw-docutils.html
pandoc -r rst -w html --output=rtirdw-pandoc.html rtirdw.rst