changeset 282:90946f87d77d

Rename RE group "character" -> "characters"
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 20 May 2026 17:28:22 +0200
parents ee512932d603
children 5eba722df93e
files pygments_lexer_pseudocode2/lexers/algpseudocode.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/pygments_lexer_pseudocode2/lexers/algpseudocode.py	Wed May 20 17:23:41 2026 +0200
+++ b/pygments_lexer_pseudocode2/lexers/algpseudocode.py	Wed May 20 17:28:22 2026 +0200
@@ -226,7 +226,7 @@
             val = match.group()
             _logger.warning("Unhandled explicit token type: %s", val)
         else:
-            val = match.group("character")
+            val = match.group("characters")
         yield match.start(), toktype, val
         if ctx:
             ctx.pos = match.end()
@@ -493,19 +493,19 @@
             # Multiple characters possible, but no escaping!
             (r"""\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)"""
              r"""(?P<sep>[/?.,:;%|=*+!\\$~"'#@_-])"""
-             r"""(?P<character>(.|\n)+?)(?P=sep)""",
+             r"""(?P<characters>(.|\n)+?)(?P=sep)""",
              op_explicit_tokentype),
-            (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\{(?P<character>[^}]+?)\}",
+            (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\{(?P<characters>[^}]+?)\}",
              op_explicit_tokentype),
-            (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\((?P<character>[^)]+?)\)",
+            (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\((?P<characters>[^)]+?)\)",
              op_explicit_tokentype),
-            (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)<(?P<character>[^>]+?)>",
+            (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)<(?P<characters>[^>]+?)>",
              op_explicit_tokentype),
-            (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\[(?P<character>[^\]]+?)\]",
+            (r"\\ttx\-(?P<type>[a-zA-Z0-9_-]+?)\[(?P<characters>[^\]]+?)\]",
              op_explicit_tokentype),
 
             # Every character is possible: no escaping needed!
-            (r"\\tt-(?P<type>[^/]+?)/(?P<character>(?:.|\n))",
+            (r"\\tt-(?P<type>[^/]+?)/(?P<characters>(?:.|\n))",
              op_explicit_tokentype),
         ],
     }