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

Links in RST epilog show a warning #1202

Open
germa89 opened this issue Sep 26, 2023 · 2 comments · May be fixed by #1204
Open

Links in RST epilog show a warning #1202

germa89 opened this issue Sep 26, 2023 · 2 comments · May be fixed by #1204

Comments

@germa89
Copy link

germa89 commented Sep 26, 2023

If you are using references in the sphinx rst_epilog variable, when you use them in the python gallery file, you get this sort of warning:

[WARNING] Reference not found for 'elem_plane183' at line 8 column 43

Basic path to replicate

Not tested

Conf.py

# make rst_epilog a variable, so you can add other epilog parts to it
rst_epilog = ""

# Read link all targets from file
with open("links.rst") as f:
    rst_epilog += f.read()

links.rst

.. _mylink: www.url.com

Example.py

"""
My example
=========
My `url <mylink_>`_ is nice!
"""
print("end")
@larsoner
Copy link
Contributor

I looked into this a little bit and it looks like this comes in the fill_notebook step when we convert to a notebook. One solution is to add rst_prolog and rst_epilog to every block of RST that we convert. But I'm not 100% sure this is a good idea or not -- I guess we could try it and if it breaks stuff for people we could make it an option.

@larsoner larsoner linked a pull request Sep 27, 2023 that will close this issue
@germa89
Copy link
Author

germa89 commented Oct 2, 2023

Thank you for working on this @larsoner

Let me know if I can help in any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants