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

D000 Cannot analyze code. No Pygments lexer found for "none". #53

Open
robrap opened this issue Feb 8, 2021 · 0 comments
Open

D000 Cannot analyze code. No Pygments lexer found for "none". #53

robrap opened this issue Feb 8, 2021 · 0 comments

Comments

@robrap
Copy link

robrap commented Feb 8, 2021

doc8 fails when using .. code-block:: none, which in Sphinx is the documented way to turn off syntax highlighting.

doc8 currently reports the error:

D000 Cannot analyze code. No Pygments lexer found for "none".

From the Sphinx documentation:

  • none (no highlighting)
  • default (similar to python3 but with a fallback to none without warning highlighting fails; the default when highlight_language isn’t set)

It looks like the current workaround, is to avoid the "none" option, and instead use the default (.. code-block::) which is similar, but different. Alternatively, it is to find the appropriate lexer and enable highlighting, as I found in this commit working around this issue.

I can understand if it is determined not to support none to avoid complexity, but even if that is the decision, it still seems like the decision would be worth capturing for those searching for this.

Thank you!

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

No branches or pull requests

1 participant