File tree 1 file changed +29
-1
lines changed
1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ file_extensions:
7
7
uuid : 0ca76258-89e6-4055-9fe0-5c45dfea987c
8
8
contexts :
9
9
10
- # This is stolen from the JavaScript.sublime-syntax
10
+ # These are stolen from the JavaScript.sublime-syntax
11
11
comments :
12
12
# - include: special-comments-conditional-compilation
13
13
- match : /\*\*(?!/)
@@ -31,10 +31,38 @@ contexts:
31
31
- match : \n
32
32
pop : true
33
33
34
+ string-content :
35
+ - match : \\\s*\n
36
+ scope : constant.character.escape.newline.js
37
+ - match : ' \\(x[\da-fA-F][\da-fA-F]|u[\da-fA-F][\da-fA-F][\da-fA-F][\da-fA-F]|.)'
38
+ scope : constant.character.escape.js
39
+
40
+ literal-string-template :
41
+ - match : ' `'
42
+ scope : punctuation.definition.string.template.begin.js
43
+ set :
44
+ - meta_include_prototype : false
45
+ - meta_scope : string.template.js
46
+ - match : " `"
47
+ scope : punctuation.definition.string.template.end.js
48
+ pop : true
49
+ - match : ' \$\{'
50
+ captures :
51
+ 0 : punctuation.definition.template-expression.begin.js
52
+ push :
53
+ - clear_scopes : 1
54
+ - meta_scope : meta.template.expression.js
55
+ - meta_content_scope : source.js.embedded.expression
56
+ - match : ' \}'
57
+ scope : punctuation.definition.template-expression.end.js
58
+ pop : true
59
+ - include : string-content
60
+
34
61
main :
35
62
- match : ' '
36
63
push : ' scope:source.js'
37
64
with_prototype :
65
+ - include : literal-string-template
38
66
- include : comments
39
67
- match : \s*\(?(?=<([a-zA-Z]+|\/))
40
68
scope : punctuation.section.embedded.begin.jsx
You can’t perform that action at this time.
0 commit comments