# HG changeset patch # User Franz Glasner # Date 1777904598 -7200 # Node ID ffe6ea2cf69bc53606c7c5094dbc93669f467327 # Parent af97692501ea0173ba2e1b5c58a8b97589db1a91 Allow "\RETURN" and "\RETURNS" commands. \RETURN: the return statement \RETURNS: like \INPUTS or \OUTPUTS diff -r af97692501ea -r ffe6ea2cf69b pygments_lexer_pseudocode2/algpseudocode.py --- a/pygments_lexer_pseudocode2/algpseudocode.py Mon May 04 16:20:44 2026 +0200 +++ b/pygments_lexer_pseudocode2/algpseudocode.py Mon May 04 16:23:18 2026 +0200 @@ -66,7 +66,6 @@ "INPUTS": "Inputs:", "OUTPUT": "Output:", "OUTPUTS": "Outputs:", - "RETURN": "Return:", "RETURNS": "Returns:", "IS": "IS", "WITH": "WITH", @@ -84,6 +83,7 @@ "LOOP": "LOOP", "REPEAT": "REPEAT", "UNTIL": "UNTIL", + "RETURN": "RETURN", "BEGIN": "BEGIN", "END": "END", # not in END_TRANSLATIONS } @@ -222,7 +222,7 @@ (r"(?i)\\(" r"(?:input(?:s)?)" r"|(?:output(?:s)?)" - r"|(?:return(?:s)?)" + r"|(?:returns)" r")[ \t]*(\{)", bygroups(op_translate(Keyword), LexBase.op_fixed(Whitespace, " ")), @@ -240,6 +240,7 @@ r"|(?:loop)" r"|(?:repeat)" r"|(?:until)" + r"|(?:return)" r")\b", bygroups(op_translate(Keyword))), (r"\\\n", Text),