{
"name": "Django HTML",
"scopeName": "text.html.django",
"fileTypes": [
"html"
],
"_comment": "Generated by: poetry run syntax",
"repository": {
"django-stuff": {
"patterns": [
{
"begin": "{%\\s*comment ?(\"([\\w\\s])*\" )?\\s*%}",
"end": "{%\\s*endcomment\\s*%}",
"name": "comment.block.django"
},
{
"match": "{#.*#}",
"name": "comment.line.number-sign.django"
},
{
"begin": "{{",
"end": "}}",
"name": "storage.type.variable.django",
"patterns": [
{
"include": "#django-template-filter"
}
],
"captures": {
"0": {
"name": "entity.tag.tagbraces.django"
}
}
},
{
"begin": "({%)\\s*(load) ",
"end": "(%})",
"name": "storage.type.templatetag.django",
"patterns": [
{
"include": "#django-template-tag-contrib"
},
{
"include": "#django-template-filter"
}
],
"captures": {
"1": {
"name": "entity.tag.tagbraces.django"
},
"2": {
"name": "keyword.control.tag-name.django"
}
}
},
{
"begin": "({%)\\s*(autoescape|endautoescape|block|endblock|blocktrans|endblocktrans|trans|plural|comment|endcomment|debug|extends|filter|firstof|for|empty|endfor|if|elif|else|endif|include|ifchanged|endifchanged|ifequal|endifequal|ifnotequal|endifnotequal|from|low|regroup|ssi|spaceless|endspaceless|templatetag|widthratio|with|endwith|csrf_token|cycle|url|verbatim|endverbatim|lorem|thumbnail|endthumbnail|get_static_prefix)\\b",
"end": "(%})",
"name": "storage.type.templatetag.django",
"patterns": [
{
"include": "#string-double-quoted"
},
{
"include": "#string-single-quoted"
},
{
"include": "#django-template-tag"
},
{
"include": "#django-template-filter"
}
],
"captures": {
"1": {
"name": "entity.tag.tagbraces.django"
},
"2": {
"name": "keyword.control.tag-name.django"
}
}
},
{
"begin": "({%)\\s*([a-zA-Z0-9_.]+)",
"end": "(%})",
"name": "storage.type.customtemplatetag.django",
"patterns": [
{
"include": "#string-double-quoted"
},
{
"include": "#string-single-quoted"
},
{
"include": "#django-template-tag"
},
{
"include": "#django-template-filter"
}
],
"captures": {
"1": {
"name": "entity.tag.tagbraces.django"
},
"2": {
"name": "constant.other.tag.name.django"
}
}
}
]
},
"django-template-filter": {
"patterns": [
{
"match": "(\\|) ?(add|addslashes|capfirst|center|cut|date|default|default_if_none|dictsort|dictsortreversed|divisibleby|escape|escapejs|filesizeformat|first|fix_ampersands|floatformat|force_escape|get_digit|iriencode|join|last|length|length_is|linebreaks|linebreaksbr|linenumbers|ljust|lower|make_list|phone2numeric|pluralize|pprint|random|removetags|rjust|safe|safeseq|slice|slugify|stringformat|striptags|time|timesince|timeutil|title|truncatewords|truncatewords_html|unordered_list|upper|urlencode|urlize|urlizetrunc|wordcount|wordwrap|yesno|apnumber|intcomma|intword|naturalday|ordinal|STATIC_PREFIX)\\b",
"name": "entity.name.function.filter.django",
"captures": {
"1": {
"name": "entity.tag.filter-pipe.django"
},
"2": {
"name": "keyword.control.filter.django"
}
}
},
{
"match": "(\\|)([a-zA-Z0-9_]+)\\b",
"name": "entity.name.function.filter.django",
"captures": {
"1": {
"name": "entity.tag.filter-pipe.django"
},
"2": {
"name": "constant.other.filter.django"
}
}
},
{
"match": ":",
"name": "keyword.operator.filter-argument.django"
},
{
"match": "=",
"name": "keyword.operator.assignment.django"
},
{
"match": ",",
"name": "keyword.operator.argument-separator.django"
},
{
"match": "\\.",
"name": "keyword.operator.getter.django"
},
{
"match": "[a-zA-Z0-9_]+",
"name": "string.unquoted.tag-string.django"
},
{
"match": "(>=|>|==|!=|<|<=|and|or|is|not|in)",
"name": "keyword.operator.condition.django"
},
{
"include": "#string-double-quoted"
},
{
"include": "#string-single-quoted"
}
]
},
"django-template-tag-contrib": {
"patterns": [
{
"match": "\\b(cache|i18n|l10n|static|tz|flatpages|humanize|admin_list|admin_modify|admin_static|admin_urls|base|log)\\b",
"name": "constant.other.contrib.django"
}
]
},
"django-template-tag": {
"patterns": [
{
"match": "\\b(and|or|not|is|in|by|as|asvar|trimmed|with)\\b",
"name": "keyword.operator.django"
}
]
},
"entities": {
"patterns": [
{
"match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
"name": "constant.character.entity.html",
"captures": {
"1": {
"name": "punctuation.definition.entity.html"
},
"3": {
"name": "punctuation.definition.entity.html"
}
}
},
{
"match": "&",
"name": "invalid.illegal.bad-ampersand.html"
}
]
},
"string-double-quoted": {
"begin": "\"",
"end": "\"",
"name": "string.quoted.double.html",
"patterns": [
{
"include": "#django-stuff"
},
{
"include": "#entities"
}
],
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
}
},
"string-single-quoted": {
"begin": "'",
"end": "'",
"name": "string.quoted.single.html",
"patterns": [
{
"include": "#entities"
}
],
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
}
},
"tag-generic-attribute": {
"match": "\\b([a-zA-Z\\-:]+)",
"name": "entity.other.attribute-name.html"
},
"tag-id-attribute": {
"begin": "\\b(id)\\b\\s*(=)",
"end": "(?<='|\")",
"name": "meta.attribute-with-value.id.html",
"patterns": [
{
"begin": "\"",
"contentName": "meta.toc-list.id.html",
"end": "\"",
"name": "string.quoted.double.html",
"patterns": [
{
"include": "#django-stuff"
},
{
"include": "#entities"
}
],
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
}
},
{
"begin": "'",
"contentName": "meta.toc-list.id.html",
"end": "'",
"name": "string.quoted.single.html",
"patterns": [
{
"include": "#entities"
}
],
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
}
}
],
"captures": {
"1": {
"name": "entity.other.attribute-name.id.html"
},
"2": {
"name": "punctuation.separator.key-value.html"
}
}
},
"tag-stuff": {
"patterns": [
{
"include": "#tag-id-attribute"
},
{
"include": "#tag-generic-attribute"
},
{
"include": "#string-double-quoted"
},
{
"include": "#string-single-quoted"
}
]
}
},
"patterns": [
{
"include": "#django-stuff"
},
{
"begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*>\\2>)",
"end": "(>)(<)(/)(\\2)(>)",
"name": "meta.tag.any.html",
"patterns": [
{
"include": "#django-stuff"
},
{
"include": "#tag-stuff"
}
],
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
},
"2": {
"name": "entity.name.tag.html"
}
},
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.end.html"
},
"2": {
"name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html"
},
"3": {
"name": "punctuation.definition.tag.begin.html"
},
"4": {
"name": "entity.name.tag.html"
},
"5": {
"name": "punctuation.definition.tag.end.html"
}
}
},
{
"begin": "(<\\?)(xml)",
"end": "(\\?>)",
"name": "meta.tag.preprocessor.xml.html",
"patterns": [
{
"include": "#tag-generic-attribute"
},
{
"include": "#string-double-quoted"
},
{
"include": "#string-single-quoted"
}
],
"captures": {
"1": {
"name": "punctuation.definition.tag.html"
},
"2": {
"name": "entity.name.tag.xml.html"
}
}
},
{
"begin": "