{ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "name": "WXML", "scopeName": "text.html.wxml", "repository": { "tag-id-attribute": { "end": "(?!\\G)(?<='|\"|[^\\s<>/])", "name": "meta.attribute-with-value.id.html", "begin": "\\b(id)\\b\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } }, "patterns": [ { "end": "\"", "patterns": [ { "include": "#wxml-interpolations" }, { "include": "#entities" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "name": "string.quoted.double.html", "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, { "end": "'", "patterns": [ { "include": "#wxml-interpolations" }, { "include": "#entities" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "contentName": "meta.toc-list.id.html", "name": "string.quoted.single.html", "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, { "name": "string.unquoted.html", "match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+", "captures": { "0": { "name": "meta.toc-list.id.html" } } } ] }, "tag-generic-attribute": { "name": "entity.other.attribute-name.html", "match": "(?<=[^=])\\b([a-zA-Z0-9:\\-\\_]+)" }, "unquoted-attribute": { "name": "string.unquoted.html", "match": "(?<==)(?:[^\\s<>/'\"]|/(?!>))+" }, "tag-stuff": { "patterns": [ { "include": "#wxml-directives" }, { "include": "#tag-id-attribute" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#unquoted-attribute" } ] }, "entities": { "patterns": [ { "name": "constant.character.entity.html", "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } } }, { "name": "invalid.illegal.bad-ampersand.html", "match": "&" } ] }, "string-double-quoted": { "end": "\"", "patterns": [ { "include": "#wxml-interpolations" }, { "include": "#entities" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "name": "string.quoted.double.html", "begin": "\"", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, "wxml-directives": { "end": "(?<='|\")|(?=[\\s<>`])", "name": "meta.directive.wxml", "begin": "((?:\\b(v-|bind:?|catch:?|capture-bind:?|mut-bind:|capture-catch:)|(:|@))([a-zA-Z\\-\\_]+)(?:\\:([a-zA-Z\\-\\_]+))?(?:\\.([a-zA-Z\\-\\_]+))*)\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.html" }, "7": { "name": "punctuation.separator.key-value.html" } }, "patterns": [ { "name": "source.directive.wxml", "contentName": "support.function.wxml", "begin": "([\"'])", "beginCaptures": { "1": { "name": "string.quoted.start.html" } }, "end": "\\1", "endCaptures": { "0": { "name": "string.quoted.end.html" } } } ] }, "wxml-interpolations": { "patterns": [ { "contentName": "markup.blob markup.heading", "end": "\\}\\}", "patterns": [ { "include": "source.js#expression" } ], "beginCaptures": { "0": { "name": "support.constant.handlebars.wxml" } }, "name": "expression.embedded.wxml", "begin": "\\{\\{", "endCaptures": { "0": { "name": "support.constant.handlebars.wxml" } } } ] }, "string-single-quoted": { "end": "'", "patterns": [ { "include": "#wxml-interpolations" }, { "include": "#entities" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "name": "string.quoted.single.html", "begin": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } } }, "uuid": "ca2e4260-5d62-45bf-8cf1-d8b5cc19c8f9", "patterns": [ { "include": "#wxml-interpolations" }, { "end": "(>)(<)(/)(\\2)(>)", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.html" } }, "name": "meta.tag.any.html", "begin": "(<)([a-zA-Z0-9:-]++)(?=[^>]*>)", "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" } } }, { "end": "(\\?>)", "name": "meta.tag.preprocessor.xml.html", "begin": "(<\\?)(xml)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } }, "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ] }, { "end": "--\\s*>", "name": "comment.block.html", "begin": "