Skip to content

Commit

Permalink
don't forget the ternaries
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed Jul 29, 2024
1 parent 89b93e2 commit 506db5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/syntax/Twig.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ contexts:
tests_body:
- meta_scope: meta.function.test.twig
- include: block_pop
- match: (?=\b(and|or|b-and|b-or|b-xor)\b)
- match: (?=\b(and|or|b-and|b-or|b-xor)\b|[?:]+)
pop: 1
# builtin tests
- match: '\bnot\b'
Expand Down
4 changes: 2 additions & 2 deletions resources/syntax/tests/syntax_test_html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -582,13 +582,13 @@
|^ punctuation.definition.expression.begin.twig
| ^ - variable.function.test.twig

{% if loop.index is divisible by(3) and foo == bar %}{% endif %}
{% if loop.index is divisible by(3) ? foo : bar %}{% endif %}
|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.statement.twig
| ^^ keyword.operator.comparison.test.twig
| ^^^^^^^^^^^^ support.function.test.twig
| ^^^ meta.function-call.arguments.twig
| ^ constant.numeric.value.twig
| ^^^ variable.other.twig
| ^^^ variable.other.twig

{# Custom test #}
{{ name is weird }}
Expand Down

0 comments on commit 506db5f

Please sign in to comment.