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
Anchor links to other markdown files produces " WARNING: local id not found in doc..." #839
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Does it work better with Moreover, no need for the anchor BTW, please put your code into |
Thank you, @dbitouze. I will enclose the document in ``` as you suggested.
Secondly, However, interestingly, I discovered that linking works if you don't use the file name at all (e.g. Here are some more (hopefully clearer) examples, including an updated conf.py.
Referencing |
I have the same problem with /docs/source/main.md:1:<translated>:1: WARNING: local id not found in doc 'test/test': 'bar' [myst.xref_missing]
/docs/source/main.md:1:<translated>:1: WARNING: local id not found in doc 'test/test': 'bar' [myst.xref_missing] Please note that
|
@lytn1ng: This is not an issue. It is a feature. Targets defined with |
Thank you,@n-peugnet. |
You can use: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-header-anchors |
This works for me, thank you, @n-peugnet |
What version of
myst-parser
are you using?2.0.0
What version dependencies are you using?
Sphinx 7.2.6
What operating system are you using?
Windows
Describe the Bug
Anchor links to other markdown files produce warning messages.
Expected Behavior
Anchor links to titles, images, figures and sections in other markdown files should produce no warnings or errors.
To Reproduce
***** conf.py *****
project = 'test_blog'
copyright = '2023, test'
author = 'test'
extensions = [
'myst_parser',
]
myst_heading_anchors = 7
templates_path = ['_templates']
exclude_patterns = []
html_theme = 'alabaster'
html_static_path = ['_static']
***** conf.py *****
5. Create 2 Markdown files as follows
***** 1.md *****
(title1-target)=
Title-1
This is some text
***** 1.md *****
***** 2.md *****
Title-2
More text and a link
***** 2.md *****
6. make clean
7. make html
It will produce "C:\Users\test\workspace\test_blog\source\2.md:2: WARNING: local id not found in doc '1': 'title1-target' [myst.xref_missing]"
The text was updated successfully, but these errors were encountered: