-
Notifications
You must be signed in to change notification settings - Fork 64
/
CoffeeScript Literate.sublime-syntax
57 lines (49 loc) · 1.62 KB
/
CoffeeScript Literate.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
51
52
53
54
55
56
57
%YAML 1.2
---
# http://www.sublimetext.com/docs/syntax.html
name: CoffeeScript (Literate)
scope: source.litcoffee
version: 2
extends: Packages/Markdown/Markdown.sublime-syntax
file_extensions:
- litcoffee
- litcoffee.erb
- coffee.md
contexts:
markdown:
- meta_prepend: true
- meta_scope: text.html.markdown.litcoffee
- include: coffee-indented-code-blocks
list-block-content:
- meta_prepend: true
- include: coffee-indented-code-blocks
coffee-indented-code-blocks:
- match: '{{indented_code_block}}'
scope: meta.embedded.litcoffee source.coffee.embedded.markdown
embed: scope:source.coffee
embed_scope: meta.embedded.litcoffee source.coffee.embedded.markdown
escape: ^(?=\s*$)
fenced-syntaxes:
- meta_append: true
- include: fenced-coffee
fenced-coffee:
- match: |-
(?x)
{{fenced_code_block_start}}
(?i:\s*(coffee(?:script)?|cjsx|cson|iced))
{{fenced_code_block_trailing_infostring_characters}}
captures:
0: meta.code-fence.definition.begin.coffee.markdown-gfm
2: punctuation.definition.raw.code-fence.begin.markdown
5: constant.other.language-name.markdown
6: comment.line.infostring.markdown
7: meta.fold.code-fence.begin.markdown
embed: scope:source.coffee
embed_scope:
markup.raw.code-fence.coffee.markdown-gfm
source.coffee
escape: '{{fenced_code_block_escape}}'
escape_captures:
0: meta.code-fence.definition.end.coffee.markdown-gfm
1: punctuation.definition.raw.code-fence.end.markdown
2: meta.fold.code-fence.end.markdown