diff options
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pygments/lexers/templates.py | 6 |
2 files changed, 2 insertions, 5 deletions
@@ -24,6 +24,7 @@ Version 2.15.0 parameters (#2359), improve lexing of variable variable syntax (#2358) * Python: add missing builtins (#2334) * Spice: update keywords (#2336) + * SQL+Jinja (``analyse_text`` method): fix catastrophic backtracking - Declare support for Python 3.11 and drop support for Python 3.6 (#2324). - Update ``native`` style to improve contrast (#2325). diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 1fcf7085..10662943 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -2291,10 +2291,6 @@ class SqlJinjaLexer(DelegatingLexer): if re.search(r'\{\{\s*source\(.*\)\s*\}\}', text): rv += 0.25 # Jinja macro - if re.search( - r'\{%-?\s*macro \w+\(.*\)\s*-?%\}\s+.*\s+\{%-?\s*endmacro\s*-?%\}', - text, - re.S, - ): + if re.search(r'\{%-?\s*macro \w+\(.*\)\s*-?%\}', text): rv += 0.15 return rv |