From 1b1d063b8a68165f700afec23bb3d54891bfb756 Mon Sep 17 00:00:00 2001 From: mbrinkhoff Date: Thu, 9 Nov 2023 01:14:44 +0100 Subject: [PATCH] Bulletproof the XREF_TAG_PATTERN for overmatching --- troubadix/helper/patterns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/troubadix/helper/patterns.py b/troubadix/helper/patterns.py index 946fe5fb..10706d70 100644 --- a/troubadix/helper/patterns.py +++ b/troubadix/helper/patterns.py @@ -143,7 +143,7 @@ def get_script_tag_pattern(script_tag: ScriptTag) -> re.Pattern: _XREF_TAG_PATTERN = ( r'script_xref\(\s*name\s*:\s*(?P[\'"])(?P{name})(?P=quote)\s*,' - r'\s*value\s*:\s*(?P[\'"])?(?P{value})(?P=quote2)?\s*\)\s*;' + r'\s*value\s*:\s*(?P[\'"])(?P{value})(?P=quote2)\s*\)\s*;' )