@@ -12,41 +12,6 @@ file_extensions:
12
12
- wpy
13
13
14
14
variables :
15
- # CSS specific variables
16
- # ======================
17
-
18
- # Embedded script and style syntaxes may be wrapped into html comments for
19
- # historical reasons. The following patterns match them, while maintaining
20
- # correct boundaries of embedded source scopes. That's required to enable
21
- # embedded syntax's comment toggling in the first and last line.
22
- #
23
- # see:
24
- # - https://github.com/sublimehq/Packages/issues/2322
25
- # - https://github.com/sublimehq/sublime_text/issues/4701
26
- script_content_begin : |-
27
- (?x:
28
- # whitespace followed by opening html comment begin punctuation
29
- \s*(<!--)
30
- # or any other non-whitespace character ahead
31
- | (?=\s*(?!<!--)\S)
32
- # or beginning of a line
33
- | ^
34
- )
35
- script_content_end : |-
36
- (?x:
37
- # optional html comment end punctuation followed by </script> tag
38
- (?: (\s*) (-->) \s* )? (?=</(?i:script){{tag_name_break_char}})
39
- # or standalone html comment end punctuation in a line
40
- | ^ (\s*) (-->) \s* $
41
- )
42
- style_content_begin : ' {{script_content_begin}}'
43
- style_content_end : |-
44
- (?x:
45
- # optional html comment end punctuation followed by </style> tag
46
- (?: (\s*) (-->) \s* )? (?=</(?i:style){{tag_name_break_char}})
47
- # or standalone html comment end punctuation in a line
48
- | ^ (\s*) (-->) \s* $
49
- )
50
15
51
16
# Vue specific variables
52
17
# ======================
@@ -69,30 +34,11 @@ contexts:
69
34
70
35
tag-html :
71
36
- meta_prepend : true
72
- - include : script-tag
73
- - include : style-tag
74
37
- include : i18n-tag
75
38
- include : template-tag
76
39
77
40
# ##[ SCRIPT TAG ]#############################################################
78
41
79
- script-tag :
80
- # required until ST4113
81
- - match : (<)((?i:script)){{tag_name_break}}
82
- captures :
83
- 1 : punctuation.definition.tag.begin.html
84
- 2 : entity.name.tag.script.html
85
- push : script-javascript
86
- - match : (</)((?i:script){{tag_name_break}})
87
- captures :
88
- 1 : punctuation.definition.tag.begin.html
89
- 2 : entity.name.tag.script.html
90
- push : script-close-tag-content
91
-
92
- script-close-tag-content :
93
- - meta_scope : meta.tag.script.end.html
94
- - include : tag-end
95
-
96
42
script-common :
97
43
- meta_prepend : true
98
44
- include : script-lang-attribute
@@ -198,30 +144,6 @@ contexts:
198
144
3 : source.coffee.embedded.html
199
145
4 : comment.block.html punctuation.definition.comment.end.html
200
146
201
- script-javascript :
202
- # required until ST4113
203
- - meta_scope : meta.tag.script.begin.html
204
- - match : ' >'
205
- scope : punctuation.definition.tag.end.html
206
- set : script-javascript-content
207
- - include : script-common
208
-
209
- script-javascript-content :
210
- # required until ST4113
211
- - meta_include_prototype : false
212
- - match : ' {{script_content_begin}}'
213
- captures :
214
- 1 : comment.block.html punctuation.definition.comment.begin.html
215
- pop : 1 # make sure to match only once
216
- embed : scope:source.js
217
- embed_scope : source.js.embedded.html
218
- escape : ' {{script_content_end}}'
219
- escape_captures :
220
- 1 : source.js.embedded.html
221
- 2 : comment.block.html punctuation.definition.comment.end.html
222
- 3 : source.js.embedded.html
223
- 4 : comment.block.html punctuation.definition.comment.end.html
224
-
225
147
script-jsx :
226
148
- meta_include_prototype : false
227
149
- meta_scope : meta.tag.script.begin.html
@@ -316,23 +238,6 @@ contexts:
316
238
317
239
# ##[ STYLE TAG ]##############################################################
318
240
319
- style-tag :
320
- # required until ST4113
321
- - match : (<)((?i:style)){{tag_name_break}}
322
- captures :
323
- 1 : punctuation.definition.tag.begin.html
324
- 2 : entity.name.tag.style.html
325
- push : style-css
326
- - match : (</)((?i:style){{tag_name_break}})
327
- captures :
328
- 1 : punctuation.definition.tag.begin.html
329
- 2 : entity.name.tag.style.html
330
- push : style-close-tag-content
331
-
332
- style-close-tag-content :
333
- - meta_scope : meta.tag.style.end.html
334
- - include : tag-end
335
-
336
241
style-common :
337
242
- meta_prepend : true
338
243
- include : style-lang-attribute
@@ -392,30 +297,6 @@ contexts:
392
297
- tag-lang-attribute-meta
393
298
- tag-generic-attribute-value
394
299
395
- style-css :
396
- # required until ST4113
397
- - meta_scope : meta.tag.style.begin.html
398
- - match : ' >'
399
- scope : punctuation.definition.tag.end.html
400
- set : style-css-content
401
- - include : style-common
402
-
403
- style-css-content :
404
- # required until ST4113
405
- - meta_include_prototype : false
406
- - match : ' {{style_content_begin}}'
407
- captures :
408
- 1 : comment.block.html punctuation.definition.comment.begin.html
409
- pop : 1 # make sure to match only once
410
- embed : scope:source.css
411
- embed_scope : source.css.embedded.html
412
- escape : ' {{style_content_end}}'
413
- escape_captures :
414
- 1 : source.css.embedded.html
415
- 2 : comment.block.html punctuation.definition.comment.end.html
416
- 3 : source.css.embedded.html
417
- 4 : comment.block.html punctuation.definition.comment.end.html
418
-
419
300
style-less :
420
301
- meta_scope : meta.tag.style.begin.html
421
302
- match : ' >'
@@ -701,26 +582,6 @@ contexts:
701
582
- meta_prepend : true
702
583
- include : vue-directive
703
584
704
- tag-class-attribute-value :
705
- # required until ST4113
706
- - meta_prepend : true
707
- - meta_include_prototype : false
708
-
709
- tag-generic-attribute-value :
710
- # required until ST4113
711
- - meta_prepend : true
712
- - meta_include_prototype : false
713
-
714
- tag-href-attribute-value :
715
- # required until ST4113
716
- - meta_prepend : true
717
- - meta_include_prototype : false
718
-
719
- tag-id-attribute-value :
720
- # required until ST4113
721
- - meta_prepend : true
722
- - meta_include_prototype : false
723
-
724
585
tag-lang-attribute-meta :
725
586
# required until ST4184 (PR #4061)
726
587
- meta_include_prototype : false
0 commit comments