Issues

Issue #1201 new

Optionally warn about not highlighted blocks

rutsky
created an issue

If I use automatic highlighting of python code and make typo which leads to unparseble python snippet then Sphinx silenty renders code not highlighted.

It would be nice feature if Sphinx will warn be about such blocks, where syntax highliting failed.

Comments (3)

  1. rutsky reporter

    I monkey-patched Sphinx to fail if not highlighted block found in Buildbot project documentation: https://github.com/buildbot/buildbot/blob/e8ef280b5ab6601eb172562fbbe1df03891f535b/master/docs/conf.py#L238

    So now either code is valid Python code and highlighted as Python, or it has language explicitly specified. No silently unhighlighted Python code with unmatched brackets.

    IMHO this feature request can be quite easily implemented in Sphinx, it only requires "green light" from project developers.

  2. Log in to comment