You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
4.6 KiB
JSON

{
"aliases": [
"jinja"
],
"case_insensitive": true,
"subLanguage": "xml",
"contains": [
{
"className": "comment",
"begin": "\\{%\\s*comment\\s*%}",
"end": "\\{%\\s*endcomment\\s*%}",
"contains": [
{
"begin": "\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b"
},
{
"className": "doctag",
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
"relevance": 0
}
]
},
{
"className": "comment",
"begin": "\\{#",
"end": "#}",
"contains": [
{
"$ref": "#contains.0.contains.0"
},
{
"className": "doctag",
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
"relevance": 0
}
]
},
{
"className": "template-tag",
"begin": "\\{%",
"end": "%}",
"contains": [
{
"className": "name",
"begin": "\\w+",
"keywords": {
"name": "comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"
},
"starts": {
"endsWithParent": true,
"keywords": "in by as",
"contains": [
{
"begin": "\\|[A-Za-z]+:?",
"keywords": {
"name": "truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"
},
"contains": [
{
"className": "string",
"begin": "\"",
"end": "\"",
"illegal": "\\n",
"contains": [
{
"begin": "\\\\[\\s\\S]",
"relevance": 0
}
]
},
{
"className": "string",
"begin": "'",
"end": "'",
"illegal": "\\n",
"contains": [
{
"$ref": "#contains.2.contains.0.starts.contains.0.contains.0.contains.0"
}
]
}
]
}
],
"relevance": 0
}
}
]
},
{
"className": "template-variable",
"begin": "\\{\\{",
"end": "}}",
"contains": [
{
"$ref": "#contains.2.contains.0.starts.contains.0"
}
]
}
]
}