forked from sublimehq/Packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into pr/javascript/fix-indentation
- Loading branch information
Showing
10 changed files
with
588 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
JavaScript/Embeddings/CSS (for JS template).sublime-syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
%YAML 1.2 | ||
--- | ||
# http://www.sublimetext.com/docs/syntax.html | ||
# highlight tagged template strings | ||
scope: source.css.js-template | ||
version: 2 | ||
hidden: true | ||
|
||
extends: Packages/CSS/CSS.sublime-syntax | ||
|
||
variables: | ||
|
||
ident_start: (?:{{nmstart}}|\${) | ||
|
||
contexts: | ||
|
||
prototype: | ||
- meta_prepend: true | ||
- include: scope:source.js#text-interpolations | ||
|
||
strings-content: | ||
- meta_prepend: true | ||
- include: scope:source.js#string-interpolations |
122 changes: 122 additions & 0 deletions
122
JavaScript/Embeddings/HTML (for JS template).sublime-syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
%YAML 1.2 | ||
--- | ||
# http://www.sublimetext.com/docs/syntax.html | ||
# highlight tagged template strings | ||
scope: text.html.js-template | ||
version: 2 | ||
hidden: true | ||
|
||
extends: Packages/HTML/HTML.sublime-syntax | ||
|
||
variables: | ||
|
||
tag_name_start: (?:[A-Za-z]|\${) | ||
|
||
contexts: | ||
|
||
prototype: | ||
- meta_prepend: true | ||
- include: scope:source.js#text-interpolations | ||
|
||
cdata-content: | ||
- meta_prepend: true | ||
- include: scope:source.js#string-interpolations | ||
|
||
script-javascript-content: | ||
- meta_include_prototype: false | ||
- match: '{{script_content_begin}}' | ||
captures: | ||
1: comment.block.html punctuation.definition.comment.begin.html | ||
pop: 1 # make sure to match only once | ||
embed: scope:source.js.js-template | ||
embed_scope: source.js.embedded.html | ||
escape: '{{script_content_end}}' | ||
escape_captures: | ||
1: source.js.embedded.html | ||
2: comment.block.html punctuation.definition.comment.end.html | ||
3: source.js.embedded.html | ||
4: comment.block.html punctuation.definition.comment.end.html | ||
|
||
script-json-content: | ||
- meta_include_prototype: false | ||
- match: '{{script_content_begin}}' | ||
captures: | ||
1: comment.block.html punctuation.definition.comment.begin.html | ||
pop: 1 # make sure to match only once | ||
embed: scope:source.json.js-template | ||
embed_scope: source.json.embedded.html | ||
escape: '{{script_content_end}}' | ||
escape_captures: | ||
1: source.json.embedded.html | ||
2: comment.block.html punctuation.definition.comment.end.html | ||
3: source.json.embedded.html | ||
4: comment.block.html punctuation.definition.comment.end.html | ||
|
||
style-css-content: | ||
- meta_include_prototype: false | ||
- match: '{{style_content_begin}}' | ||
captures: | ||
1: comment.block.html punctuation.definition.comment.begin.html | ||
pop: 1 # make sure to match only once | ||
embed: scope:source.css.js-template | ||
embed_scope: source.css.embedded.html | ||
escape: '{{style_content_end}}' | ||
escape_captures: | ||
1: source.css.embedded.html | ||
2: comment.block.html punctuation.definition.comment.end.html | ||
3: source.css.embedded.html | ||
4: comment.block.html punctuation.definition.comment.end.html | ||
|
||
tag-event-attribute-value: | ||
- match: \" | ||
scope: | ||
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 | ||
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.js-template | ||
embed_scope: meta.string.html meta.embedded.html source.js.embedded.html | ||
escape: \' | ||
escape_captures: | ||
0: meta.string.html string.quoted.single.html | ||
punctuation.definition.string.end.html | ||
- include: else-pop | ||
|
||
tag-style-attribute-value: | ||
- match: \" | ||
scope: | ||
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 | ||
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.js-template#rule-list-body | ||
embed_scope: meta.string.html meta.embedded.html source.css.embedded.html | ||
escape: \' | ||
escape_captures: | ||
0: meta.string.html string.quoted.single.html | ||
punctuation.definition.string.end.html | ||
- include: else-pop | ||
|
||
tag-attribute-value-content: | ||
- meta_prepend: true | ||
- include: scope:source.js#string-interpolations | ||
|
||
strings-common-content: | ||
- meta_prepend: true | ||
- include: scope:source.js#string-interpolations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%YAML 1.2 | ||
--- | ||
# http://www.sublimetext.com/docs/syntax.html | ||
# highlight tagged template strings | ||
scope: source.json.js-template | ||
version: 2 | ||
hidden: true | ||
|
||
extends: Packages/JSON/JSON.sublime-syntax | ||
|
||
contexts: | ||
prototype: | ||
- meta_prepend: true | ||
- include: scope:source.js#text-interpolations | ||
|
||
string-prototype: | ||
- meta_prepend: true | ||
- include: scope:source.js#string-interpolations |
19 changes: 19 additions & 0 deletions
19
JavaScript/Embeddings/JavaScript (JS template).sublime-syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
%YAML 1.2 | ||
--- | ||
# http://www.sublimetext.com/docs/syntax.html | ||
# highlight tagged template strings | ||
scope: source.js.js-template | ||
version: 2 | ||
hidden: true | ||
|
||
extends: Packages/JavaScript/JavaScript.sublime-syntax | ||
|
||
contexts: | ||
|
||
prototype: | ||
- meta_prepend: true | ||
- include: scope:source.js#text-interpolations | ||
|
||
string-content: | ||
- meta_prepend: true | ||
- include: scope:source.js#string-interpolations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.