diff --git a/Syntaxes/CSS/CSS (for HTML double-quoted).sublime-syntax b/Syntaxes/CSS/CSS (for HTML double-quoted).sublime-syntax new file mode 100644 index 0000000..d4f689e --- /dev/null +++ b/Syntaxes/CSS/CSS (for HTML double-quoted).sublime-syntax @@ -0,0 +1,16 @@ +%YAML 1.2 +--- +scope: source.css.embedded.string.quoted.double.twig +version: 2 +hidden: true + +extends: CSS (Twig).sublime-syntax + +contexts: + prototype: + - meta_prepend: true + - match: (?=") + pop: 1 + + main: + - include: rule-list-body diff --git a/Syntaxes/CSS/CSS (for HTML single-quoted).sublime-syntax b/Syntaxes/CSS/CSS (for HTML single-quoted).sublime-syntax new file mode 100644 index 0000000..2d84aff --- /dev/null +++ b/Syntaxes/CSS/CSS (for HTML single-quoted).sublime-syntax @@ -0,0 +1,16 @@ +%YAML 1.2 +--- +scope: source.css.embedded.string.quoted.single.twig +version: 2 +hidden: true + +extends: CSS (Twig).sublime-syntax + +contexts: + prototype: + - meta_prepend: true + - match: (?=') + pop: 1 + + main: + - include: rule-list-body diff --git a/Syntaxes/HTML/HTML (Twig).sublime-syntax b/Syntaxes/HTML/HTML (Twig).sublime-syntax index 93ad543..b7803f7 100644 --- a/Syntaxes/HTML/HTML (Twig).sublime-syntax +++ b/Syntaxes/HTML/HTML (Twig).sublime-syntax @@ -122,39 +122,61 @@ contexts: 4: comment.block.html punctuation.definition.comment.end.html tag-event-attribute-value: + - meta_include_prototype: false - match: \" - scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html - embed: scope:source.js.twig#expressions - embed_scope: meta.string.html source.js.embedded.html - escape: \" - escape_captures: - 0: meta.string.html string.quoted.double.html punctuation.definition.string.end.html + scope: string.quoted.double.html punctuation.definition.string.begin.html + set: tag-event-attribute-value-double-quoted-body - match: \' - scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html - embed: scope:source.js.twig#expressions - embed_scope: meta.string.html source.js.embedded.html - escape: \' - escape_captures: - 0: meta.string.html string.quoted.single.html punctuation.definition.string.end.html + scope: string.quoted.single.html punctuation.definition.string.begin.html + set: tag-event-attribute-value-single-quoted-body - include: else-pop + tag-event-attribute-value-double-quoted-body: + - meta_include_prototype: false + - meta_scope: meta.string.html + - meta_content_scope: meta.interpolation.html source.js.embedded.html + - match: \" + scope: string.quoted.double.html punctuation.definition.string.end.html + pop: 1 + - include: scope:source.js.embedded.string.quoted.double.twig + + tag-event-attribute-value-single-quoted-body: + - meta_include_prototype: false + - meta_scope: meta.string.html + - meta_content_scope: meta.interpolation.html source.js.embedded.html + - match: \' + scope: string.quoted.single.html punctuation.definition.string.end.html + pop: 1 + - include: scope:source.js.embedded.string.quoted.single.twig + tag-style-attribute-value: + - meta_include_prototype: false - match: \" - scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html - embed: scope:source.css.twig#rule-list-body - embed_scope: meta.string.html source.css.embedded.html - escape: \" - escape_captures: - 0: meta.string.html string.quoted.double.html punctuation.definition.string.end.html + scope: string.quoted.double.html punctuation.definition.string.begin.html + set: tag-style-attribute-value-double-quoted-body - match: \' - scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html - embed: scope:source.css.twig#rule-list-body - embed_scope: meta.string.html source.css.embedded.html - escape: \' - escape_captures: - 0: meta.string.html string.quoted.single.html punctuation.definition.string.end.html + scope: string.quoted.single.html punctuation.definition.string.begin.html + set: tag-style-attribute-value-single-quoted-body - include: else-pop + tag-style-attribute-value-double-quoted-body: + - meta_include_prototype: false + - meta_scope: meta.string.html + - meta_content_scope: meta.interpolation.html source.css.embedded.html + - match: \" + scope: string.quoted.double.html punctuation.definition.string.end.html + pop: 1 + - include: scope:source.css.embedded.string.quoted.double.twig + + tag-style-attribute-value-single-quoted-body: + - meta_include_prototype: false + - meta_scope: meta.string.html + - meta_content_scope: meta.interpolation.html source.css.embedded.html + - match: \' + scope: string.quoted.single.html punctuation.definition.string.end.html + pop: 1 + - include: scope:source.css.embedded.string.quoted.single.twig + tag-attribute-value-content: - meta_prepend: true - include: Text (Twig).sublime-syntax#interpolations diff --git a/Syntaxes/HTML/syntax_test_scopes.html.twig b/Syntaxes/HTML/syntax_test_scopes.html.twig index 2a292b2..cd869cb 100644 --- a/Syntaxes/HTML/syntax_test_scopes.html.twig +++ b/Syntaxes/HTML/syntax_test_scopes.html.twig @@ -2330,3 +2330,112 @@ {# ^ meta.property-list.css meta.block.css - meta.property-value #} {# ^ - meta.property-list - meta.block - meta.embedded #} + +|============================================================================== +| Inline Events +|============================================================================== + +
+{#^^^ meta.tag #} +{# ^ punctuation.definition.tag.end.html #} + +|============================================================================== +| Inline Styles +|============================================================================== + +
+{#^^^ meta.tag #} +{# ^ punctuation.definition.tag.end.html #} diff --git a/Syntaxes/JavaScript/JavaScript (for HTML double-quoted).sublime-syntax b/Syntaxes/JavaScript/JavaScript (for HTML double-quoted).sublime-syntax new file mode 100644 index 0000000..9b4015f --- /dev/null +++ b/Syntaxes/JavaScript/JavaScript (for HTML double-quoted).sublime-syntax @@ -0,0 +1,16 @@ +%YAML 1.2 +--- +scope: source.js.embedded.string.quoted.double.twig +version: 2 +hidden: true + +extends: JavaScript (Twig).sublime-syntax + +contexts: + prototype: + - meta_prepend: true + - match: (?=") + pop: 1 + + main: + - include: expressions diff --git a/Syntaxes/JavaScript/JavaScript (for HTML single-quoted).sublime-syntax b/Syntaxes/JavaScript/JavaScript (for HTML single-quoted).sublime-syntax new file mode 100644 index 0000000..8e00901 --- /dev/null +++ b/Syntaxes/JavaScript/JavaScript (for HTML single-quoted).sublime-syntax @@ -0,0 +1,16 @@ +%YAML 1.2 +--- +scope: source.js.embedded.string.quoted.single.twig +version: 2 +hidden: true + +extends: JavaScript (Twig).sublime-syntax + +contexts: + prototype: + - meta_prepend: true + - match: (?=') + pop: 1 + + main: + - include: expressions