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

Bug: Linked monospace text in markdown cells does not render correctly #397

Open
eric-wieser opened this issue Feb 23, 2020 · 3 comments
Open

Comments

@eric-wieser
Copy link

eric-wieser commented Feb 23, 2020

Something like:

[`Cl()`](../generated/clifford.Cl.rst)

looks fine in jupyter, but in sphinx renders as

`Cl() <../generated/clifford.Cl.rst>`__.

@eric-wieser eric-wieser changed the title Bug: Linked monospace text does not render correctly: Bug: Linked monospace text in markdown cells does not render correctly Feb 23, 2020
@mgeier
Copy link
Member

mgeier commented Feb 24, 2020

Thanks for the report!

This is a known issue, though: #301.

If you have further ideas how to tackle this, please let me know!

@eric-wieser
Copy link
Author

eric-wieser commented Feb 24, 2020

Here's how you could do it - for all links, convert

some [some arbitrary rst](some_link) sentence

to

some |some_unique_id| sentence

.. |some_unique_id| replace:: some arbitrary rst
.. some_unique_id: some_link

@mgeier
Copy link
Member

mgeier commented Feb 25, 2020

Thanks @eric-wieser, this looks promising!

Your example seems to be missing two underscores, though:

some |some_unique_id|_ sentence

.. |some_unique_id| replace:: some arbitrary rst
.. _some_unique_id: some_link

While we are still using Pandoc (see #36), I think it would make sense to add this feature directly to Pandoc's reST writer.

And lo and behold, there are already some related Pandoc issues:

As soon as someone implements this in Pandoc, it will be automatically available in nbsphinx.

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