Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reStructuredText Replacement Text in References Doesn't Work #6588

Closed
tkurtbond opened this issue Aug 4, 2020 · 0 comments
Closed

reStructuredText Replacement Text in References Doesn't Work #6588

tkurtbond opened this issue Aug 4, 2020 · 0 comments

Comments

@tkurtbond
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants