diff --git a/Vue Component.sublime-syntax b/Vue Component.sublime-syntax index 18ed39f..4ed5d8d 100644 --- a/Vue Component.sublime-syntax +++ b/Vue Component.sublime-syntax @@ -627,6 +627,11 @@ contexts: - include: template-lang-decider template-lang-decider: + - match: (?i)(?=haml{{unquoted_attribute_break}}|\'haml\'|"haml") + set: + - template-haml + - tag-lang-attribute-meta + - tag-generic-attribute-value - match: (?i)(?=jade{{unquoted_attribute_break}}|\'jade\'|"jade") set: - template-jade @@ -648,6 +653,20 @@ contexts: - tag-lang-attribute-meta - tag-generic-attribute-value + template-haml: + - meta_scope: meta.tag.template.begin.html + - match: '>' + scope: punctuation.definition.tag.end.html + set: template-haml-content + - include: template-common + + template-haml-content: + - match: '{{template_content_begin}}' + embed: scope:text.haml + embed_scope: text.haml.embedded.html + escape: '{{template_content_end}}' + pop: 1 + template-jade: - meta_scope: meta.tag.template.begin.html - match: '>' diff --git a/tests/syntax_test_template.vue b/tests/syntax_test_template.vue index b2998d4..78c78a2 100644 --- a/tests/syntax_test_template.vue +++ b/tests/syntax_test_template.vue @@ -12,6 +12,31 @@ // <- text.html.vue - text text // ^^^^^^^^^^^ meta.tag.template.end.html + + + +// ^^^^^^^^^^^ meta.tag - meta.tag meta.tag - text.haml +// ^^ punctuation.definition.tag.begin.html +// ^^^^^^^^ entity.name.tag.template.html +// ^ punctuation.definition.tag.end.html + + + // ^^^^^^^^^^^^^^^^^^^^^^ meta.tag - source // ^^^^^ text.jade.embedded.html - meta.tag @@ -32,7 +57,6 @@ // ^^^^^^^^^^^^^^ text.jade.embedded.html - meta.tag - comment // ^^^^^^^^^^^ meta.tag - source -