Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff docs/conf.py @ 286:051c8877ee22
Implement lexer option "strict_tokentype".
It allows the \ttX command to synthesize not yet existing token types.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 21 May 2026 09:32:35 +0200 |
| parents | e5ea2f955986 |
| children |
line wrap: on
line diff
--- a/docs/conf.py Wed May 20 20:35:37 2026 +0200 +++ b/docs/conf.py Thu May 21 09:32:35 2026 +0200 @@ -230,6 +230,10 @@ app.add_lexer("no-raiseonerror-algpseudocode", functools.partial(AlgPseudocodeLexer, prohibit_raiseonerror_filter=True)) + # Example for \ttX{Generic.Not.Yet.Existing}{...} + app.add_lexer("nonstrict-algpseudocode", + functools.partial(AlgPseudocodeLexer, + strict_tokentype=False)) # # To test with the custom filter that maps # Token.Error to Token.Generic.Error
