Skip to content

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

Description

@robrap

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions