{
    "aliases": [
        "craftcms"
    ],
    "case_insensitive": true,
    "subLanguage": "xml",
    "contains": [
        {
            "className": "comment",
            "begin": "\\{#",
            "end": "#}",
            "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": "template-tag",
            "begin": "\\{%",
            "end": "%}",
            "contains": [
                {
                    "className": "name",
                    "begin": "\\w+",
                    "keywords": "apply autoescape block deprecated do embed extends filter flush for from if import include macro sandbox set use verbatim with endapply endautoescape endblock enddeprecated enddo endembed endextends endfilter endflush endfor endfrom endif endimport endinclude endmacro endsandbox endset enduse endverbatim endwith",
                    "starts": {
                        "endsWithParent": true,
                        "contains": [
                            {
                                "begin": "\\|[A-Za-z_]+:?",
                                "keywords": "abs batch capitalize column convert_encoding date date_modify default escape filter first format inky_to_html inline_css join json_encode keys last length lower map markdown merge nl2br number_format raw reduce replace reverse round slice sort spaceless split striptags title trim upper url_encode",
                                "contains": [
                                    {
                                        "beginKeywords": "attribute block constant cycle date dump include max min parent random range source template_from_string",
                                        "keywords": {
                                            "name": "attribute block constant cycle date dump include max min parent random range source template_from_string"
                                        },
                                        "relevance": 0,
                                        "contains": [
                                            {
                                                "className": "params",
                                                "begin": "\\(",
                                                "end": "\\)"
                                            }
                                        ]
                                    }
                                ]
                            },
                            {
                                "$ref": "#contains.1.contains.0.starts.contains.0.contains.0"
                            }
                        ],
                        "relevance": 0
                    }
                }
            ]
        },
        {
            "className": "template-variable",
            "begin": "\\{\\{",
            "end": "}}",
            "contains": [
                "self",
                {
                    "$ref": "#contains.1.contains.0.starts.contains.0"
                },
                {
                    "$ref": "#contains.1.contains.0.starts.contains.0.contains.0"
                }
            ]
        }
    ]
}
