diff --git a/Vue Component.sublime-syntax b/Vue Component.sublime-syntax index 1eacc6b..07248dc 100644 --- a/Vue Component.sublime-syntax +++ b/Vue Component.sublime-syntax @@ -2,7 +2,6 @@ --- name: Vue Component file_extensions: [vue] -first_line_match: (?i)<(!DOCTYPE\s*)?html scope: text.html.vue variables: attribute_char: (?:[^ "'>/=\x00-\x1f\x7f-\x9f]) @@ -639,15 +638,21 @@ contexts: - include: tag-event-attribute - include: tag-generic-attribute mustache-expression: - - match: '{{' - scope: punctuation.definition.template.begin.html - embed: scope:source.js - escape: '}}' - escape_captures: - 0: punctuation.definition.template.end.html + - match: (?={{) + set: + - meta_scope: meta.template.vue + - match: '{{' + scope: punctuation.definition.template.begin.html + embed: scope:source.js + embed_scope: source.js.embedded.vue + escape: '}}' + escape_captures: + 0: meta.template.vue punctuation.definition.template.end.html + - match: '' + pop: true template-tag: - - match: (<)((?i:template))\b + - match: (<)((?i:template(>| )))\b captures: 0: meta.tag.template.begin.html 1: punctuation.definition.tag.begin.html @@ -674,12 +679,14 @@ contexts: - match: '"' scope: punctuation.definition.string.begin.html embed: scope:source.js + embed_scope: source.js.embedded.vue escape: '"' escape_captures: 0: punctuation.definition.string.end.html - match: "'" scope: punctuation.definition.string.begin.html embed: scope:source.js + embed_scope: source.js.embedded.vue escape: "'" escape_captures: 0: punctuation.definition.string.end.html diff --git a/Vue Component.sublime-syntax.yaml-macros b/Vue Component.sublime-syntax.yaml-macros index d4cf034..732b88a 100644 --- a/Vue Component.sublime-syntax.yaml-macros +++ b/Vue Component.sublime-syntax.yaml-macros @@ -14,18 +14,24 @@ contexts: !merge - include: mustache-expression mustache-expression: - - match: '{{' - scope: punctuation.definition.template.begin.html - embed: scope:source.js - escape: '}}' - escape_captures: - 0: punctuation.definition.template.end.html + - match: '(?={{)' + set: + - meta_scope: meta.template.vue + - match: '{{' + scope: punctuation.definition.template.begin.html + embed: scope:source.js + embed_scope: source.js.embedded.vue + escape: '}}' + escape_captures: + 0: meta.template.vue punctuation.definition.template.end.html + - match: '' + pop: true tag-attributes: !prepend - include: vue-directive template-tag: - - match: (<)((?i:template))\b + - match: (<)((?i:template(>| )))\b captures: 0: meta.tag.template.begin.html 1: punctuation.definition.tag.begin.html @@ -52,12 +58,14 @@ contexts: !merge - match: '"' scope: punctuation.definition.string.begin.html embed: scope:source.js + embed_scope: source.js.embedded.vue escape: '"' escape_captures: 0: punctuation.definition.string.end.html - match: "'" scope: punctuation.definition.string.begin.html embed: scope:source.js + embed_scope: source.js.embedded.vue escape: "'" escape_captures: 0: punctuation.definition.string.end.html
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: