Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff docs/conf.py @ 160:b4028838e0c8
Implement lexer option "prohibit_raiseonerror_filter".
Sphinx raises by default when an Error token is seen (by means of the
"raiseonerror" filter that is applied by default to lexers in Sphinx).
This option skips this and allows error locations to be seen and highlighted
properly.
While there convert most Generic.Error tokens to Error tokens because now
they can be handled by a lexer with "prohibit_raiseonerror_filter=True".
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 08 May 2026 17:46:28 +0200 |
| parents | 902147c24f9b |
| children | a4317957148b |
line wrap: on
line diff
--- a/docs/conf.py Fri May 08 17:13:26 2026 +0200 +++ b/docs/conf.py Fri May 08 17:46:28 2026 +0200 @@ -92,3 +92,7 @@ # app.add_lexer("NoEndAlgPseudocode", functools.partial(AlgPseudocodeLexer, no_end=True)) + # For developing a lexer with smoother error handling + app.add_lexer("no-raiseonerror-algpseudocode", + functools.partial(AlgPseudocodeLexer, + prohibit_raiseonerror_filter=True))
