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

Optionally warn about not highlighted blocks #1201

Closed
shimizukawa opened this issue Jan 3, 2015 · 3 comments
Closed

Optionally warn about not highlighted blocks #1201

shimizukawa opened this issue Jan 3, 2015 · 3 comments
Labels
type:enhancement enhance or introduce a new feature

Comments

@shimizukawa
Copy link
Member

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.


@shimizukawa shimizukawa added the type:enhancement enhance or introduce a new feature label Jan 3, 2015
@shimizukawa
Copy link
Member Author

From rutsky on 2013-06-25 19:29:41+00:00

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.

@ericholscher
Copy link
Contributor

👍 Just ran into this. Also wish it would try and parse more smartly, and not just bail back to plain text.

@shimizukawa shimizukawa added this to the 1.4 milestone Apr 24, 2015
@tk0miya
Copy link
Member

tk0miya commented Jan 24, 2016

The warning was introduced since 1.3.5.
More details, see #1565.

Thanks,

@tk0miya tk0miya closed this as completed Jan 24, 2016
@tk0miya tk0miya removed this from the 1.4 milestone Jan 24, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

3 participants