MyST-Parser: Add suppress warning type for any `'myst' reference target not found`
The following warning:
../../CONTRIBUTING.md:4: WARNING: 'myst' reference target not found: README.md
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:
- Create markdown document with a reference to root level readme eg
[README](README.md) - Add
suppress_warnings = ['myst.reference']to sphinxconf.py - Build docs with sphinx
Expected behavior
Would be nice to suppress any warning by any arbitrary text.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 3
- Comments: 15 (7 by maintainers)
@mara004 what worked for me is:
I guess that the need of the original author is to suppress these warnings, not to fix the issue itself. I have the same request.
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.
Which warning type do I need to suppress to hide
'myst' reference target not foundandUnknown target namewarnings?Naturally, we are happy to receive PRs with proposals to add such features