-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Ignore markup errors in comments #35
Comments
Perhaps a flag to ignore comments? Sometimes when writing documentation I comment things out that I want to return to later. However that is a niche use-case---Ezio's example is probably more common where people don't care about the markup in comments. A |
I would ignore markup in comments, just as (I assume) Sphinx also does. Similar to #34, where we want to ignore markup inside code blocks. |
As far as I know sphinx-lint works line by line, without parsing the markup (it only uses regexes), so this might be tricky to implement unless we change it to handle more context. |
Docutils (and hence also Sphinx) just includes the text verbatim in a comment node:
A |
There is a check for comments, but only on the same line -- the Lines 511 to 512 in b377556
A |
I ran
sphinx-lint
against a project that includes the following in theindex.rst
:Since I was using the
--enable default-role
option, I got the following error, even though the markup appears in a comment:Should
sphinx-lint
ignore markup errors in a comment?The text was updated successfully, but these errors were encountered: