I work on the GeoTools project
, which has been successfully building its documentation using Sphinx for years. Thanks for sharing Sphinx with the rest of the world :-D
In the recent days one of our Github actions picked up the latest versions of Sphinx and Pygments, which results in a build warning (which we treat as a failure, trying to keep documentation in good shape). The versions involved are:
- Sphinx is version 4.3.2
- Pygments version is 2.11.1
The directive failing is a simple:
.. literalinclude:: /../src/main/java/org/geotools/tutorial/csv3/parse/CSVStrategy.java
:start-after: // docs start createBuilder
:end-before: // docs end findMostSpecificTypesFromData
and the file included is this one:
The error message just states lexing did not work:
[exec] Warning, treated as error:
[exec] /home/aaime/devel/git-gt/docs/user/tutorial/datastore/strategy.rst:245:Could not lex literal_block as "java". Highlighting skipped.
However I've tried to use "pygmentize" on the command line, it highlights the file without errors. Also tried leaving just the section of code that is meant to be highlighted, same results, no errors, e.g:
> pygmentize -V
Pygments version 2.11.1, (c) 2006-2021 by Georg Brandl, Matthäus Chajdas and contributors.
> pygmentize -l java /home/aaime/devel/git-gt/docs/src/main/java/org/geotools/tutorial/csv3/parse/CSVStrategy.java
(works fine, output omitted)
I'm stuck here... any idea of what I could do to address this issue?