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

Verbatim in reference link in RST by Sphinx #6793

Open
sky-y opened this issue Nov 1, 2020 · 3 comments
Open

Verbatim in reference link in RST by Sphinx #6793

sky-y opened this issue Nov 1, 2020 · 3 comments

Comments

@sky-y
Copy link

sky-y commented Nov 1, 2020

When pandoc generates verbatim in reference link in rst from Pandoc's Markdown, Sphinx cannot interpret it correctly. Then I got an broken html output by Sphinx's make html.

Example

verbatim-in-reference-link.md (Pandoc's Markdown)

---
title: verbatim in reference link
---

When using LaTeX, the following packages need to be available
(they are included with all recent versions of [TeX Live]):
[`amsfonts`]

[TeX Live]: https://www.tug.org/texlive/
[`amsfonts`]: https://ctan.org/pkg/amsfonts

verbatim-in-reference-link.rst (pandoc generated, wrong)

# pandoc.sh
pandoc verbatim-in-reference-link.md -o verbatim-in-reference-link.rst --reference-link -s
==========================
verbatim in reference link
==========================

When using LaTeX, the following packages need to be available (they are
included with all recent versions of `TeX Live`_): ```amsfonts```_

.. _TeX Live: https://www.tug.org/texlive/
.. _``amsfonts``: https://ctan.org/pkg/amsfonts

wrong

verbatim-in-reference-link-correct.rst (handwriting, expected)

==========================
verbatim in reference link (correct version)
==========================

When using LaTeX, the following packages need to be available (they are
included with all recent versions of `TeX Live`_): |amsfonts|_

.. _TeX Live: https://www.tug.org/texlive/
.. |amsfonts| replace:: ``amsfonts``
.. _amsfonts: https://ctan.org/pkg/amsfonts

correct

Related Issue (in Sphinx):

@sky-y
Copy link
Author

sky-y commented Nov 1, 2020

Note: it's could be out of scope for rst writer because it's related to Sphinx.I don't know that the verbatim in reference link should be satisfy the original rst spec (without Sphinx directives).

@jgm
Copy link
Owner

jgm commented Nov 1, 2020

I doubt that the issue is specific to Sphinx (EDIT: confirmed: it's not).
And even if it is, we'd like to be Sphinx-compatible.

@jgm
Copy link
Owner

jgm commented Nov 1, 2020

Related: #3973 #4339

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

2 participants