Skip to content

Commit

Permalink
Add test for custom template tags
Browse files Browse the repository at this point in the history
Ensure the first word is always scoped `keyword` in `{% %}` tags.
  • Loading branch information
deathaxe committed Jan 3, 2025
1 parent 90393da commit bd2e700
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Syntaxes/HTML/syntax_test_django.djt.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@
##^^^^^^^^^^ meta.embedded.statement.jinja source.jinja.embedded keyword.other.endtag.jinja


## [ DJANGO CUSTOM TAGS ] #####################################################

{% mytemplate condition < 10 %}
## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.embedded.statement.jinja
## ^^ punctuation.section.embedded.begin.jinja
## ^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.jinja.embedded
## ^^^^^^^^^^ keyword.other.tag.jinja
## ^^^^^^^^^ variable.other.readwrite.jinja
## ^ keyword.operator.symbol.jinja keyword.operator.comparison.jinja
## ^^ meta.number.integer.decimal.jinja constant.numeric.value.jinja
## ^^ punctuation.section.embedded.end.jinja

{% endmytemplate %}
## ^^^^^^^^^^^^^^^^^^^ meta.embedded.statement.jinja
## ^^ punctuation.section.embedded.begin.jinja
## ^^^^^^^^^^^^^^^ source.jinja.embedded
## ^^^^^^^^^^^^^ keyword.other.endtag.jinja
## ^^ punctuation.section.embedded.end.jinja


## [ DJANGO FILTERS ] #########################################################

{{ somevariable|cut:"0" }}
Expand Down

0 comments on commit bd2e700

Please sign in to comment.