-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add suppress warning type for any 'myst' reference target not found
#402
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
heys @jaymegordo could you provide a minimal working example to reproduce this warning, i.e. it seems like you have something like this
|
I have following folder structure:-
Following is problematic line in
On running |
I believe that the issue here is that |
I guess that the need of the original author is to suppress these warnings, not to fix the issue itself. I include some files in the Sphinx documentation which are targeted at people who navigate the source code in an IDE or in a github or Bitbucket GUI. I include links to certain files which should not be copied to the documentation output, e.g. a header file or source file, to support easy navigation in the code. The warnings we get are along the lines of:
Wanted behavior: Just remove the link and output the text (if available) or the link. ideally, all files which are excluded or have different file extension (e.g. *.txt, *.cpp, *.h, *.xml) do not raise a warning, while others do. |
@chrisjsewell : Are you still actively working on MyST-parser? I have not seen much activity of you since the last release (1.5.2 End of August). This topic is still important to us. Who will pick up the development? |
Yes, but I'm afraid this is just not a priority fix for myself, since it is not it is not keeping with sphinx itself: I think you can probably suppress all reference warnings, I don't know off-hand what the warning type is (it would be nice is sphinx itself provided these like myst does, but unfortunately they don't sphinx-doc/sphinx#8845) |
Naturally, we are happy to receive PRs with proposals to add such features |
'myst' reference target not found
I think the problem here is that a warning is raised in the first place, not to suppress it. And it's because the syntax is ambiguous. We can do |
An issue here is that Sphinx only copies over the files that are explicitly included as a part of the document model, so if you did So it's a bit more complex than just telling Sphinx not to raise a warning if the file is not a source file. That said, I'm surprised that this works in rST. What happens? Does it not throw a warning, but that link is then broken in the final output? |
I agree that the use case is somewhat esoteric. But I just happened to answer a question on SO today where the user was asking for a way around the It should also work with folders named in |
Exactly! In rST there's a difference between a file you just link to (i.e. In Markdown, I just have links, whether it's The issue pops up here since we want to include already existing Markdown documents with our developer documentation in sphinx - and they are full of links to source files etc. @chrisjsewell : Anyhow, I'm happy and relieved to read that MyST Parser is still under active development / maintainance and you would be willing to review PRs. Very good 👍🏼 keep up the good work. |
Which warning type do I need to suppress to hide |
@mara004 what worked for me is:
|
Thanks! |
The following warning:
doesn't seem to be raised in the same was as other myst warnings, eg doesn't have
[myst.header]
at the end of the warning.To Reproduce
Steps to reproduce the behavior:
[README](README.md)
suppress_warnings = ['myst.reference']
to sphinxconf.py
Expected behavior
Would be nice to suppress any warning by any arbitrary text.
The text was updated successfully, but these errors were encountered: