comparison 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
comparison
equal deleted inserted replaced
285:afbca50b7dc1 286:051c8877ee22
228 functools.partial(AlgPseudocodeLexer, no_end=True)) 228 functools.partial(AlgPseudocodeLexer, no_end=True))
229 # For developing a lexer with smoother error handling 229 # For developing a lexer with smoother error handling
230 app.add_lexer("no-raiseonerror-algpseudocode", 230 app.add_lexer("no-raiseonerror-algpseudocode",
231 functools.partial(AlgPseudocodeLexer, 231 functools.partial(AlgPseudocodeLexer,
232 prohibit_raiseonerror_filter=True)) 232 prohibit_raiseonerror_filter=True))
233 # Example for \ttX{Generic.Not.Yet.Existing}{...}
234 app.add_lexer("nonstrict-algpseudocode",
235 functools.partial(AlgPseudocodeLexer,
236 strict_tokentype=False))
233 # 237 #
234 # To test with the custom filter that maps 238 # To test with the custom filter that maps
235 # Token.Error to Token.Generic.Error 239 # Token.Error to Token.Generic.Error
236 # 240 #
237 app.add_lexer("genericerror-algpseudocode", 241 app.add_lexer("genericerror-algpseudocode",