-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Sphinx 1.3.5: Could not parse literal_block as "language" #2264
Comments
The second block would have been unhighlighted in previous Sphinx versions too. Only the warning is new to make you aware of it. |
@birkenfeld is this a change in Pygments or Sphinx? Either way, it's a good change that helped me catch a couple of other mistakes. |
This was added to Sphinx in #1565. |
Would it be helpful to add to the change log something like this?
Reasoning: When searching the change log, I could not find anything relevant to "literal_block". This would link the error message to a specific change log entry and provide a clue for what changed in 1.3.5 and how to fix it. Alternatively, the warning message could refer to the specific directive that literal_block refers to, e.g.,
I can submit a PR, but the change log is very terse, and I wouldn't want to break that pattern. If not, then this issue can be closed, and at the least this discussion can be indexed by search engines. |
OK, I'll update it later. |
@stevepiercy This change also effects to other directives (cf. So I rewrite changelog as follows:
Thanks, |
Thank you! |
see sphinx-doc/sphinx#2264 Should fix the build.
see sphinx-doc/sphinx#2264 Should fix the build.
see sphinx-doc/sphinx#2264 Should fix the build.
see sphinx-doc/sphinx#2264 Should fix the build. Conflicts: Resources/doc/cookbook/recipe_sortable_listing.rst Resources/doc/reference/architecture.rst Resources/doc/reference/getting_started.rst
see sphinx-doc/sphinx#2264 Should fix the build.
If i use sphinx 1.6.2 or 1.6.3 with pygments<=2.1.3 the following error is reported: But with pygments 2.2 The above error is not reported. |
Is it possible to log in more detail why lexing failed? |
@jean could you file a new issue please? I'll take a look later. |
The following might not be a bug, but it is a changed behavior that enforces stricter syntax, and should be noted.
How to reproduce
For this code sample (and several others):
Sphinx 1.3.4 yielded no errors. Upgrading to 1.3.5 and attempting to build HTML causes the following error:
/home/travis/build/Pylons/pyramid/docs/narr/project.rst:434: WARNING: Could not parse literal_block as "ini". highlighting skipped.
How to Fix/Workaround
Use a comment for elided output instead of a literal
...
. It appears that one can no longer use incorrect syntax for a given language for highlighting.The screenshot compares two examples, where the first is highlighted but the second is not.
I noticed that this shows up for
javascript
orposh
syntaxes, too.Possibly related to #2262.
The text was updated successfully, but these errors were encountered: