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!
doc8 fails when using
.. code-block:: none, which in Sphinx is the documented way to turn off syntax highlighting.doc8 currently reports the error:
From the Sphinx documentation:
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
noneto 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!