Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison pygments_lexer_pseudocode2/lexers/algpseudocode.py @ 276:397ed930a5ba
Allow more separator characters for explicit token types.
Extensive tests including a special test when using the backslash.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 20 May 2026 12:10:01 +0200 |
| parents | f365d9d2c0ad |
| children | ee512932d603 |
comparison
equal
deleted
inserted
replaced
| 275:f365d9d2c0ad | 276:397ed930a5ba |
|---|---|
| 489 ], | 489 ], |
| 490 "explicit-tokentype": [ | 490 "explicit-tokentype": [ |
| 491 # All these REs are CASE-SENSITIVE! | 491 # All these REs are CASE-SENSITIVE! |
| 492 | 492 |
| 493 # Multiple characters possible, but no escaping! | 493 # Multiple characters possible, but no escaping! |
| 494 (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)(?P<sep>[/:|=*+!\\$~])" | 494 (r"""\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)""" |
| 495 r"(?P<character>(.|\n)+?)(?P=sep)", | 495 r"""(?P<sep>[/?.,:;%|=*+!\\$~"'#@_-])""" |
| 496 r"""(?P<character>(.|\n)+?)(?P=sep)""", | |
| 496 op_explicit_tokentype), | 497 op_explicit_tokentype), |
| 497 (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\{(?P<character>[^}]+?)\}", | 498 (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\{(?P<character>[^}]+?)\}", |
| 498 op_explicit_tokentype), | 499 op_explicit_tokentype), |
| 499 (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\((?P<character>[^)]+?)\)", | 500 (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\((?P<character>[^)]+?)\)", |
| 500 op_explicit_tokentype), | 501 op_explicit_tokentype), |
