From cec3a96314628c6b377ccf8f87998989748c335b Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 5 Oct 2024 11:17:28 +0200 Subject: [PATCH] [Common] Adjust meta.embedded vs. meta.interpolation inspired by #3051 This commit aligns meta.embedded and meta.interpolation scopes across HTML and its template languages. The rule of thumb being applied is: 1. declarative syntaxes (CSS, JSON) or those executed at runtime (JS) are not scoped meta.embedded nor meta.interpolation. They are treated as belonging to HTML It's wrong value of `
` being scoped `meta.interpolation` as this is not what interpolation is. 2. tags interpreted or executed by a pre-processor or template engine are scoped meta.embedded regardless they appear in normal text or strings. A template engine's interpreter does not know anything about HTML or any other top-level syntax. It just interprets `embedded` special tokens. Some engines such as php distinguish statements `` and expressions `` with the latter ones often used to expand to strings (acting like interpolation). Both are still scoped `meta.embedded` as distinction is not possible in all template syntaxes and some of them even provide additional real string interpolation constructs. 3. only real string interpolations are scoped meta.interpolation, which most likely are part of an embedded templating language itself. ERB provides `#{var}` interpolation to be used everywhere, for instance. --- ASP/HTML (ASP).sublime-syntax | 17 ++---- ASP/syntax_test_asp.asp | 40 +++++++------- ... Embedded Backtick Strings).sublime-syntax | 8 +-- Go/HTML (Go).sublime-syntax | 8 +-- Go/tests/syntax_test_template.html | 2 +- Go/tests/syntax_test_template.md | 2 +- HTML/HTML.sublime-syntax | 8 +-- HTML/syntax_test_html.html | 24 ++++----- Java/HTML (JSP).sublime-syntax | 16 ++---- .../HTML (for JS template).sublime-syntax | 8 +-- .../HTML (for TS template).sublime-syntax | 8 +-- ...HTML (for PHP Interpolated).sublime-syntax | 8 +-- PHP/tests/syntax_test_php.php | 28 +++++----- .../Embeddings/HTML (for HAML).sublime-syntax | 16 ++---- Rails/HTML (Rails).sublime-syntax | 16 ++---- Rails/tests/syntax_test_rails.haml | 21 ++++---- Rails/tests/syntax_test_rails.html.erb | 54 +++++++++---------- .../Embeddings/HTML (for Ruby).sublime-syntax | 16 ++---- 18 files changed, 129 insertions(+), 171 deletions(-) diff --git a/ASP/HTML (ASP).sublime-syntax b/ASP/HTML (ASP).sublime-syntax index 0852641d4d..5e5c9ae969 100644 --- a/ASP/HTML (ASP).sublime-syntax +++ b/ASP/HTML (ASP).sublime-syntax @@ -42,9 +42,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.embedded.asp - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -54,9 +52,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.embedded.asp - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -69,9 +65,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.embedded.asp#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -81,9 +75,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.embedded.asp#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -271,7 +263,6 @@ contexts: asp-tag-clear-scope: - clear_scopes: 1 - - meta_scope: meta.interpolation.html - include: immediately-pop asp-tag-content: diff --git a/ASP/syntax_test_asp.asp b/ASP/syntax_test_asp.asp index e115c0992b..081ec34676 100644 --- a/ASP/syntax_test_asp.asp +++ b/ASP/syntax_test_asp.asp @@ -170,22 +170,22 @@ @@ -1244,10 +1244,10 @@ test = "hello%> '^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.block.any.html ' ^^^^^^^^^ meta.tag.block.any.html ' ^^^^^ meta.attribute-with-value.class.html entity.other.attribute-name.class.html -' ^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.interpolation -' ^^ meta.attribute-with-value.class.html meta.string.html meta.interpolation.html - string -' ^^^^^^^^^ meta.attribute-with-value.class.html meta.string.html meta.interpolation.html - string -' ^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.interpolation +' ^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.embedded +' ^^ meta.attribute-with-value.class.html meta.string.html meta.embedded.asp - string +' ^^^^^^^^^ meta.attribute-with-value.class.html meta.string.html meta.embedded.asp - string +' ^ meta.attribute-with-value.class.html meta.string.html string.quoted.double.html - meta.embedded ' ^ - string ' ^^^^^^^^^^^^^^^^ meta.class-name.html ' ^^^^^^^^^^ meta.class-name.html @@ -1376,7 +1376,7 @@ test = "hello%> interpolation.]]> ' ^^^^^^^^^^ meta.tag.sgml.cdata.html meta.string.html string.unquoted.cdata.html -' ^^^^^^^^^^^^^^^ meta.tag.sgml.cdata.html meta.string.html meta.interpolation.html - string +' ^^^^^^^^^^^^^^^ meta.tag.sgml.cdata.html meta.string.html meta.embedded.asp - string ' ^^^^^^^^^^^^^^^ meta.tag.sgml.cdata.html meta.string.html string.unquoted.cdata.html ' ^^^ punctuation.section.embedded.begin.asp ' ^^ punctuation.section.embedded.end.asp @@ -1384,7 +1384,7 @@ test = "hello%> <%=attr%>=<%=value%>/> ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.other.html ' ^ meta.tag.other.html punctuation.definition.tag.begin.html -' ^^^ entity.name.tag.other.html - meta.interpolation +' ^^^ entity.name.tag.other.html - meta.embedded ' ^^^^^^^^ entity.name.tag.other.html meta.embedded.asp ' ^^^ punctuation.section.embedded.begin.asp ' ^^^ variable.other.asp diff --git a/Go/Embeddings/HTML (for Go Embedded Backtick Strings).sublime-syntax b/Go/Embeddings/HTML (for Go Embedded Backtick Strings).sublime-syntax index d686ae0234..878aef4d45 100644 --- a/Go/Embeddings/HTML (for Go Embedded Backtick Strings).sublime-syntax +++ b/Go/Embeddings/HTML (for Go Embedded Backtick Strings).sublime-syntax @@ -73,7 +73,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.go-embedded-backtick-string - embed_scope: meta.string.html meta.embedded.html source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -83,7 +83,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.go-embedded-backtick-string - embed_scope: meta.string.html meta.embedded.html source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -96,7 +96,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.go-embedded-backtick-string#rule-list-body - embed_scope: meta.string.html meta.embedded.html source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -106,7 +106,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.go-embedded-backtick-string#rule-list-body - embed_scope: meta.string.html meta.embedded.html source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html diff --git a/Go/HTML (Go).sublime-syntax b/Go/HTML (Go).sublime-syntax index ed0db6cc60..693a7c3c07 100644 --- a/Go/HTML (Go).sublime-syntax +++ b/Go/HTML (Go).sublime-syntax @@ -77,7 +77,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.go - embed_scope: meta.string.html meta.embedded.html source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -87,7 +87,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.go - embed_scope: meta.string.html meta.embedded.html source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -100,7 +100,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.go#rule-list-body - embed_scope: meta.string.html meta.embedded.html source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -110,7 +110,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.go#rule-list-body - embed_scope: meta.string.html meta.embedded.html source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html diff --git a/Go/tests/syntax_test_template.html b/Go/tests/syntax_test_template.html index ad5eef8209..bea7878088 100644 --- a/Go/tests/syntax_test_template.html +++ b/Go/tests/syntax_test_template.html @@ -97,7 +97,7 @@ | ^^^^ meta.tag - meta.attribute-with-value | ^^^^^^ meta.tag meta.attribute-with-value.style.html - meta.string | ^^^^^^^^ meta.tag meta.attribute-with-value.style.html meta.string.html - meta.interpolation -| ^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.style.html meta.string.html meta.embedded.html source.css.embedded.html meta.property-value.css meta.interpolation.go +| ^^^^^^^^^^^^^^^ meta.tag meta.attribute-with-value.style.html meta.string.html source.css.embedded.html meta.property-value.css meta.interpolation.go | ^ meta.tag meta.attribute-with-value.style.html meta.string.html - meta.interpolation | ^^ meta.tag - meta.attribute-with-value | ^^ punctuation.section.interpolation.begin.go - source.go.template diff --git a/Go/tests/syntax_test_template.md b/Go/tests/syntax_test_template.md index ba92a958f6..e11442fb72 100644 --- a/Go/tests/syntax_test_template.md +++ b/Go/tests/syntax_test_template.md @@ -161,7 +161,7 @@ | ^^^^ meta.disable-markdown meta.tag - meta.attribute-with-value | ^^^^^^ meta.disable-markdown meta.tag meta.attribute-with-value.style.html - meta.string | ^^^^^^^^ meta.disable-markdown meta.tag meta.attribute-with-value.style.html meta.string.html - meta.interpolation -| ^^^^^^^^^^^^^^^ meta.disable-markdown meta.tag meta.attribute-with-value.style.html meta.string.html meta.embedded.html source.css.embedded.html meta.property-value.css meta.interpolation.go +| ^^^^^^^^^^^^^^^ meta.disable-markdown meta.tag meta.attribute-with-value.style.html meta.string.html source.css.embedded.html meta.property-value.css meta.interpolation.go | ^ meta.disable-markdown meta.tag meta.attribute-with-value.style.html meta.string.html - meta.interpolation | ^^ meta.disable-markdown meta.tag - meta.attribute-with-value | ^^ punctuation.section.interpolation.begin.go - source.go.template diff --git a/HTML/HTML.sublime-syntax b/HTML/HTML.sublime-syntax index 600b1db80e..bc327a2bc3 100644 --- a/HTML/HTML.sublime-syntax +++ b/HTML/HTML.sublime-syntax @@ -683,14 +683,14 @@ contexts: - match: \" scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js - embed_scope: meta.string.html meta.interpolation.html source.js.embedded.html + 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 - match: \' scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js - embed_scope: meta.string.html meta.interpolation.html source.js.embedded.html + 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 @@ -859,14 +859,14 @@ contexts: - match: \" scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css#rule-list-body - embed_scope: meta.string.html meta.interpolation.html source.css.embedded.html + 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 - match: \' scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css#rule-list-body - embed_scope: meta.string.html meta.interpolation.html source.css.embedded.html + 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 diff --git a/HTML/syntax_test_html.html b/HTML/syntax_test_html.html index 0c1f282e91..e0e5d9c2c0 100644 --- a/HTML/syntax_test_html.html +++ b/HTML/syntax_test_html.html @@ -798,9 +798,9 @@ ## ^ - meta.attribute-with-value.style ## ^^^^^^^^^^^^^^^^^^^ - meta.attribute-with-value.style meta.attribute-with-value.style ## ^^^^^^ meta.attribute-with-value.style.html - meta.string - string - source.css - ## ^ meta.attribute-with-value.style.html meta.string.html - meta.interpolation - source.css - ## ^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html meta.interpolation.html source.css.embedded.html - string - ## ^ meta.attribute-with-value.style.html meta.string.html - meta.interpolation - source.css + ## ^ meta.attribute-with-value.style.html meta.string.html - source.css + ## ^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html source.css.embedded.html - string + ## ^ meta.attribute-with-value.style.html meta.string.html - source.css ## ^^^^^ entity.other.attribute-name.style.html ## ^ punctuation.separator.key-value.html ## ^ string.quoted.double.html punctuation.definition.string.begin.html @@ -813,9 +813,9 @@ ## ^ - meta.attribute-with-value.style ## ^^^^^^^^^^^^^^^^^^^^ - meta.attribute-with-value.style meta.attribute-with-value.style ## ^^^^^^ meta.attribute-with-value.style.html - meta.string - string - source.css - ## ^ meta.attribute-with-value.style.html meta.string.html - meta.interpolation - source.css - ## ^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html meta.interpolation.html source.css.embedded.html - string - ## ^ meta.attribute-with-value.style.html meta.string.html - meta.interpolation - source.css + ## ^ meta.attribute-with-value.style.html meta.string.html - source.css + ## ^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html source.css.embedded.html - string + ## ^ meta.attribute-with-value.style.html meta.string.html - source.css ## ^^^^^ entity.other.attribute-name.style.html ## ^ punctuation.separator.key-value.html ## ^ string.quoted.single.html punctuation.definition.string.begin.html @@ -863,9 +863,9 @@ ## ^ - meta.attribute-with-value.event ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - meta.attribute-with-value meta.attribute-with-value - source.js source.js ## ^^^^^^^^ meta.attribute-with-value.event - meta.string - ## ^ meta.attribute-with-value.event.html meta.string.html - meta.interpolation - ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html meta.interpolation.html - ## ^ meta.attribute-with-value.event.html meta.string.html - meta.interpolation + ## ^ meta.attribute-with-value.event.html meta.string.html + ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html + ## ^ meta.attribute-with-value.event.html meta.string.html ## ^^^^^^^^ entity.other.attribute-name ## ^ string.quoted.double.html punctuation.definition.string.begin.html - source.js ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.js.embedded.html - string @@ -878,9 +878,9 @@ ## ^ - meta.attribute-with-value.event ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - meta.attribute-with-value meta.attribute-with-value - source.js source.js ## ^^^^^^^^ meta.attribute-with-value.event - meta.string - ## ^ meta.attribute-with-value.event.html meta.string.html - meta.interpolation - ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html meta.interpolation.html - ## ^ meta.attribute-with-value.event.html meta.string.html - meta.interpolation + ## ^ meta.attribute-with-value.event.html meta.string.html + ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html + ## ^ meta.attribute-with-value.event.html meta.string.html ## ^^^^^^^^ entity.other.attribute-name ## ^ string.quoted.single.html punctuation.definition.string.begin.html - source.js ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.js.embedded.html - string diff --git a/Java/HTML (JSP).sublime-syntax b/Java/HTML (JSP).sublime-syntax index 02308d611c..ffb8a74468 100644 --- a/Java/HTML (JSP).sublime-syntax +++ b/Java/HTML (JSP).sublime-syntax @@ -142,9 +142,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.embedded.jsp - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -154,9 +152,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.embedded.jsp - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -169,9 +165,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.embedded.jsp#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -181,9 +175,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.embedded.jsp#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html diff --git a/JavaScript/Embeddings/HTML (for JS template).sublime-syntax b/JavaScript/Embeddings/HTML (for JS template).sublime-syntax index 2d81737e03..ef2b4482ec 100644 --- a/JavaScript/Embeddings/HTML (for JS template).sublime-syntax +++ b/JavaScript/Embeddings/HTML (for JS template).sublime-syntax @@ -73,7 +73,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.js-template - embed_scope: meta.string.html meta.embedded.html source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -83,7 +83,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.js-template - embed_scope: meta.string.html meta.embedded.html source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -96,7 +96,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.js-template#rule-list-body - embed_scope: meta.string.html meta.embedded.html source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -106,7 +106,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.js-template#rule-list-body - embed_scope: meta.string.html meta.embedded.html source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html diff --git a/JavaScript/Embeddings/HTML (for TS template).sublime-syntax b/JavaScript/Embeddings/HTML (for TS template).sublime-syntax index 35961f339a..a00f7cdbf6 100644 --- a/JavaScript/Embeddings/HTML (for TS template).sublime-syntax +++ b/JavaScript/Embeddings/HTML (for TS template).sublime-syntax @@ -73,7 +73,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.ts-template - embed_scope: meta.string.html meta.embedded.html source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -83,7 +83,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.ts-template - embed_scope: meta.string.html meta.embedded.html source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -96,7 +96,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.ts-template#rule-list-body - embed_scope: meta.string.html meta.embedded.html source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -106,7 +106,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.ts-template#rule-list-body - embed_scope: meta.string.html meta.embedded.html source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html diff --git a/PHP/Embeddings/HTML (for PHP Interpolated).sublime-syntax b/PHP/Embeddings/HTML (for PHP Interpolated).sublime-syntax index 6ce4c8cb1d..4f64a06720 100644 --- a/PHP/Embeddings/HTML (for PHP Interpolated).sublime-syntax +++ b/PHP/Embeddings/HTML (for PHP Interpolated).sublime-syntax @@ -79,14 +79,14 @@ contexts: - match: \" scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.interpolated.php - embed_scope: meta.string.html meta.interpolation.html source.js.embedded.html + 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 - match: \' scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.interpolated.php - embed_scope: meta.string.html meta.interpolation.html source.js.embedded.html + 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 @@ -96,14 +96,14 @@ contexts: - match: \" scope: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.interpolated.php#rule-list-body - embed_scope: meta.string.html meta.interpolation.html source.css.embedded.html + 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 - match: \' scope: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.interpolated.php#rule-list-body - embed_scope: meta.string.html meta.interpolation.html source.css.embedded.html + 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 diff --git a/PHP/tests/syntax_test_php.php b/PHP/tests/syntax_test_php.php index 1c33997725..8e84b89921 100644 --- a/PHP/tests/syntax_test_php.php +++ b/PHP/tests/syntax_test_php.php @@ -6085,28 +6085,28 @@ function foo() {

">text

-// ^ meta.attribute-with-value.style.html meta.string.html string.quoted.double.html punctuation.definition.string.begin.html - meta.interpolation -// ^^^^^^^ meta.attribute-with-value.style.html meta.string.html meta.interpolation.html source.css.embedded.html - meta.embedded.php -// ^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html meta.interpolation.html source.css.embedded.html meta.embedded.php -// ^ meta.attribute-with-value.style.html meta.string.html string.quoted.double.html punctuation.definition.string.end.html - meta.interpolation +// ^ meta.attribute-with-value.style.html meta.string.html string.quoted.double.html punctuation.definition.string.begin.html - source +// ^^^^^^^ meta.attribute-with-value.style.html meta.string.html source.css.embedded.html - meta.embedded.php +// ^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html source.css.embedded.html meta.embedded.php +// ^ meta.attribute-with-value.style.html meta.string.html string.quoted.double.html punctuation.definition.string.end.html - source // ^ text.html.php meta.tag.block.any.html punctuation.definition.tag.end.html

'>text

-// ^ meta.attribute-with-value.style.html meta.string.html string.quoted.single.html punctuation.definition.string.begin.html - meta.interpolation -// ^^^^^^^ meta.attribute-with-value.style.html meta.string.html meta.interpolation.html source.css.embedded.html - meta.embedded.php -// ^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html meta.interpolation.html source.css.embedded.html meta.embedded.php -// ^ meta.attribute-with-value.style.html meta.string.html string.quoted.single.html punctuation.definition.string.end.html - meta.interpolation +// ^ meta.attribute-with-value.style.html meta.string.html string.quoted.single.html punctuation.definition.string.begin.html - source +// ^^^^^^^ meta.attribute-with-value.style.html meta.string.html source.css.embedded.html - meta.embedded.php +// ^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html source.css.embedded.html meta.embedded.php +// ^ meta.attribute-with-value.style.html meta.string.html string.quoted.single.html punctuation.definition.string.end.html - source // ^ text.html.php meta.tag.block.any.html punctuation.definition.tag.end.html

)">text

-// ^ meta.attribute-with-value.event.html meta.string.html string.quoted.double.html punctuation.definition.string.begin.html - meta.interpolation -// ^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html meta.interpolation.html source.js.embedded.html meta.function-call -// ^ meta.attribute-with-value.event.html meta.string.html string.quoted.double.html punctuation.definition.string.end.html - meta.interpolation +// ^ meta.attribute-with-value.event.html meta.string.html string.quoted.double.html punctuation.definition.string.begin.html - source +// ^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html source.js.embedded.html meta.function-call +// ^ meta.attribute-with-value.event.html meta.string.html string.quoted.double.html punctuation.definition.string.end.html - source

)'>text

-// ^ meta.attribute-with-value.event.html meta.string.html string.quoted.single.html punctuation.definition.string.begin.html - meta.interpolation -// ^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html meta.interpolation.html source.js.embedded.html meta.function-call -// ^ meta.attribute-with-value.event.html meta.string.html string.quoted.single.html punctuation.definition.string.end.html - meta.interpolation +// ^ meta.attribute-with-value.event.html meta.string.html string.quoted.single.html punctuation.definition.string.begin.html - source +// ^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html source.js.embedded.html meta.function-call +// ^ meta.attribute-with-value.event.html meta.string.html string.quoted.single.html punctuation.definition.string.end.html - source interpolation.]]> // ^^^^^^^^^^ meta.tag.sgml.cdata.html meta.string.html string.unquoted.cdata.html diff --git a/Rails/Embeddings/HTML (for HAML).sublime-syntax b/Rails/Embeddings/HTML (for HAML).sublime-syntax index 143c991104..7c3bca116b 100644 --- a/Rails/Embeddings/HTML (for HAML).sublime-syntax +++ b/Rails/Embeddings/HTML (for HAML).sublime-syntax @@ -52,9 +52,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.embedded.haml - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -64,9 +62,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.embedded.haml - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -79,9 +75,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.embedded.haml#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -91,9 +85,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.embedded.haml#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html diff --git a/Rails/HTML (Rails).sublime-syntax b/Rails/HTML (Rails).sublime-syntax index 1c39d631af..c62c511e29 100644 --- a/Rails/HTML (Rails).sublime-syntax +++ b/Rails/HTML (Rails).sublime-syntax @@ -79,9 +79,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.rails - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -91,9 +89,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.rails - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -106,9 +102,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.rails#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -118,9 +112,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.rails#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html diff --git a/Rails/tests/syntax_test_rails.haml b/Rails/tests/syntax_test_rails.haml index 6934bbba44..3546ea1838 100644 --- a/Rails/tests/syntax_test_rails.haml +++ b/Rails/tests/syntax_test_rails.haml @@ -376,18 +376,17 @@ / ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.attributes.haml meta.parens.haml / ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.event.html meta.string.html / ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html -/ ^^^^ meta.interpolation.html - meta.interpolation meta.interpolation -/ ^^^^^^^^ meta.interpolation.html meta.interpolation.haml -/ ^^^^^^ meta.interpolation.html - meta.interpolation meta.interpolation -/ ^^^^^^^^ meta.interpolation.html meta.interpolation.haml -/ ^^^ meta.interpolation.html - meta.interpolation meta.interpolation +/ ^^^^ - meta.interpolation +/ ^^^^^^^^ meta.interpolation.haml +/ ^^^^^^ - meta.interpolation +/ ^^^^^^^^ meta.interpolation.haml +/ ^^^ - meta.interpolation / ^^^^^^^^^ - meta.interpolation -/ ^^^^^^ meta.interpolation.html - meta.interpolation meta.interpolation -/ ^^^^^^^^^^^^^ meta.interpolation.html meta.interpolation.haml -/ ^^^^^^^^ meta.interpolation.html - meta.interpolation meta.interpolation -/ ^^^^^^^^ meta.interpolation.html meta.interpolation.haml -/ ^^ meta.interpolation.html - meta.interpolation meta.interpolation -/ ^ - meta.interpolation +/ ^^^^^^ - meta.interpolation +/ ^^^^^^^^^^^^^ meta.interpolation.haml +/ ^^^^^^^^ - meta.interpolation +/ ^^^^^^^^ meta.interpolation.haml +/ ^^^ - meta.interpolation / ^ string.quoted.double.html punctuation.definition.string.begin.html / ^^^ variable.function / ^ punctuation.section.group.begin.js diff --git a/Rails/tests/syntax_test_rails.html.erb b/Rails/tests/syntax_test_rails.html.erb index 8ab3e10b0a..9b7e1ec2b3 100644 --- a/Rails/tests/syntax_test_rails.html.erb +++ b/Rails/tests/syntax_test_rails.html.erb @@ -54,22 +54,22 @@ @@ -112,14 +112,14 @@ # ^^^ punctuation.section.embedded.end.rails

-# ^ meta.attribute-with-value.style.html meta.string.html - meta.interpolation -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html meta.interpolation.html source.css.embedded.html +# ^ meta.attribute-with-value.style.html meta.string.html - source +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute-with-value.style.html meta.string.html source.css.embedded.html # ^^^^^^^^^^^^^^^^^^ meta.property-value.css meta.embedded.rails # ^^^^ meta.property-value.css - meta.embedded # ^^^^^^^^^^ meta.property-value.css meta.embedded.rails # ^^^^^^ meta.property-value.css - meta.embedded # ^^^^^^^^^ meta.property-value.css meta.embedded.rails -# ^ meta.attribute-with-value.style.html meta.string.html - meta.interpolation +# ^ meta.attribute-with-value.style.html meta.string.html - source # ^ string.quoted.double.html punctuation.definition.string.begin.html # ^^^^^^^^^^^ support.type.property-name # ^^ punctuation.section.embedded.begin.rails @@ -146,17 +146,17 @@ text # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.inline.any.html meta.attribute-with-value.event.html meta.string.html -# ^^^^ meta.interpolation.html - meta.interpolation meta.interpolation - meta.embedded -# ^^^^^^^^^^^ meta.interpolation.html meta.embedded.rails -# ^^^^^^ meta.interpolation.html - meta.interpolation meta.interpolation - meta.embedded -# ^^^^^^^^^^^ meta.interpolation.html meta.string.js meta.interpolation.rails meta.embedded.rails -# ^^^ meta.interpolation.html - meta.interpolation meta.interpolation - meta.embedded +# ^^^^ - meta.embedded +# ^^^^^^^^^^^ meta.embedded.rails +# ^^^^^^ - meta.interpolation meta.interpolation - meta.embedded +# ^^^^^^^^^^^ meta.string.js meta.interpolation.rails meta.embedded.rails +# ^^^ - meta.embedded # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.tag.inline.any.html meta.attribute-with-value.style.html meta.string.html -# ^^^^^^ meta.interpolation.html - meta.interpolation meta.interpolation - meta.embedded -# ^^^^^^^^^^^^^^^^ meta.interpolation.html meta.embedded.rails -# ^^^^^^^^ meta.interpolation.html - meta.interpolation meta.interpolation - meta.embedded -# ^^^^^^^^^^^ meta.interpolation.html meta.string.css meta.interpolation.rails meta.embedded.rails -# ^^ meta.interpolation.html - meta.interpolation meta.interpolation - meta.embedded +# ^^^^^^ - meta.embedded +# ^^^^^^^^^^^^^^^^ meta.embedded.rails +# ^^^^^^^^ - meta.embedded +# ^^^^^^^^^^^ meta.string.css meta.interpolation.rails meta.embedded.rails +# ^^ - meta.embedded # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.js.embedded.html meta.function-call # ^^ punctuation.section.embedded.begin.rails # ^^^^^^^ source.ruby.rails.embedded.rails diff --git a/Ruby/Embeddings/HTML (for Ruby).sublime-syntax b/Ruby/Embeddings/HTML (for Ruby).sublime-syntax index 0965fb1a42..2267527996 100644 --- a/Ruby/Embeddings/HTML (for Ruby).sublime-syntax +++ b/Ruby/Embeddings/HTML (for Ruby).sublime-syntax @@ -49,9 +49,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.js.embedded.ruby - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -61,9 +59,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.js.embedded.ruby - embed_scope: - meta.string.html meta.interpolation.html - source.js.embedded.html + embed_scope: meta.string.html source.js.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html @@ -76,9 +72,7 @@ contexts: meta.string.html string.quoted.double.html punctuation.definition.string.begin.html embed: scope:source.css.embedded.ruby#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \" escape_captures: 0: meta.string.html string.quoted.double.html @@ -88,9 +82,7 @@ contexts: meta.string.html string.quoted.single.html punctuation.definition.string.begin.html embed: scope:source.css.embedded.ruby#rule-list-body - embed_scope: - meta.string.html meta.interpolation.html - source.css.embedded.html + embed_scope: meta.string.html source.css.embedded.html escape: \' escape_captures: 0: meta.string.html string.quoted.single.html