-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHTML (Hyperscript no tag attributes).sublime-syntax
50 lines (46 loc) · 1.71 KB
/
HTML (Hyperscript no tag attributes).sublime-syntax
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%YAML 1.2
---
name: HTML (Hyperscript no tag attributes)
scope: text.html.hyperscript.basic
version: 2
extends: Packages/HTML/HTML.sublime-syntax
contexts:
script-hyperscript:
- meta_scope: meta.tag.script.begin.html
- match: '>'
scope: punctuation.definition.tag.end.html
set: script-hyperscript-content
- include: script-common
script-hyperscript-content:
- meta_include_prototype: false
- match: \s*((<!\[)(CDATA)(\[))
captures:
1: meta.tag.sgml.cdata.html
2: punctuation.definition.tag.begin.html
3: keyword.declaration.cdata.html
4: punctuation.definition.tag.begin.html
pop: 1 # make sure to match only once
embed: scope:source.hyperscript
embed_scope: meta.tag.sgml.cdata.html source.hyperscript.embedded.html
escape: \]\]>
escape_captures:
0: meta.tag.sgml.cdata.html punctuation.definition.tag.end.html
- 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.hyperscript
embed_scope: source.hyperscript.embedded.html
escape: '{{script_content_end}}'
escape_captures:
1: source.hyperscript.embedded.html
2: comment.block.html punctuation.definition.comment.end.html
3: source.hyperscript.embedded.html
4: comment.block.html punctuation.definition.comment.end.html
script-type-decider:
- meta_prepend: true
- match: (?=(?i:text/hyperscript{{unquoted_attribute_break}}|'text/hyperscript'|"text/hyperscript"))
set:
- script-hyperscript
- tag-generic-attribute-meta
- tag-generic-attribute-value