fix(jinja): remove crashing pattern

https://github.com/cathaysia/tree-sitter-jinja/issues/37
This commit is contained in:
Christian Clason 2025-07-21 11:00:40 +02:00 committed by Christian Clason
parent 6b3bf164b2
commit 8c8742871a
2 changed files with 8 additions and 27 deletions

View file

@ -125,14 +125,14 @@
"." "."
(identifier)+ @variable.member) (identifier)+ @variable.member)
; jinja filters ; crashes parser: https://github.com/cathaysia/tree-sitter-jinja/issues/37
(binary_expression ; ; jinja filters
(binary_operator ; (binary_expression
"|") ; (binary_operator
(unary_expression ; "|")
(primary_expression ; (unary_expression
(identifier) @function.call))) ; (primary_expression
; (identifier) @function.call)))
(inline_trans (inline_trans
"_" @function.builtin) "_" @function.builtin)

View file

@ -1,19 +0,0 @@
{{ name|striptags|title }}
{# ^^^^ @variable #}
{# ^^^^^ @function.call #}
{# ^^^^^ @function.call #}
{{ listx|join(', ') }}
{# ^^^^^ @variable #}
{# ^^^^ @function.call #}
{# ^^^^ @string #}
{{ listx|join(str) }}
{# ^^^^^ @variable #}
{# ^^^^ @function.call #}
{# ^^^ @variable.parameter #}
{{ foo.bar|random }}
{# ^^^ @variable #}
{# ^^^ @variable.member #}
{# ^^^^^^ @function.call #}