-
Notifications
You must be signed in to change notification settings - Fork 302
/
fenced-code.cson
97 lines (87 loc) · 4.24 KB
/
fenced-code.cson
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# NOTE
# No 'name' attribute prevents this Grammar file from showing up in the Grammar selection
scopeName: "fenced-code.md"
# Objects in {list} have the following structure:
#
# {
# pattern: {string}
# include: {string}
# contentName: {string}
# }
#
# or (when possible) the short-hand form:
#
# { pattern: {string} }
#
# The short-hand form is only applicable when the {pattern} is a single term, like 'c' or 'css'.
# For anything more complex, use the full pattern, or it might be ignored when the grammar is compiled.
#
# The short-hand form is automatically expanded according to the following rules:
# - {include} becomes 'source.' + pattern
# - {contentName} becomes 'source.embedded.' + pattern
# NOTE
# Keep this list alphabetized
list: [
{ pattern:'apib|apiblueprint', include:'text.html.markdown.source.gfm.apib', contentName:'source.embedded.gfm.apib' }
{ pattern:'ass' }
# Added for #211 to support the language-babel package. Remove if it conflicts with regular Javascript
{ pattern:'babel', include:'source.js.jsx', contentName:'source.embedded.js.jsx' }
{ pattern:'coffee|coffeescript|coffee-script', include:'source.coffee', contentName:'source.embedded.coffee' }
{ pattern:'c' }
{ pattern:'clean' }
{ pattern:'clojure' }
{ pattern:'cpp|c\\+\\+', include:'source.cpp', contentName:'source.embedded.cpp' }
{ pattern:'cr|crystal', include:'source.crystal', contentName:'source.embedded.crystal'}
{ pattern:'cs|csharp', include:'source.cs', contentName:'source.embedded.cs' }
{ pattern:'css' }
{ pattern:'diff|patch|rej', include:'source.diff', contentName:'source.embedded.diff' }
{ pattern:'elixir' }
{ pattern:'elm' }
# { pattern:'ecr', include:'source.crystal', contentName:'text.html.ecr'}
# { pattern:'erb', include:'source.ruby', contentName:'text.html.erb' }
{ pattern:'erlang' }
{ pattern:'go|golang', include:'source.go', contentName:'source.embedded.go' }
{ pattern:'haskell' }
{ pattern:'hcl' }
{ pattern:'html', include:'text.html.basic', contentName:'source.embedded.html' }
{ pattern:'idris' }
{ pattern:'java' }
{ pattern:'javascript|js|jsx', include:'source.js', contentName:'source.embedded.js' }
{ pattern:'json|har', include:'source.json', contentName:'source.embedded.json' }
{ pattern:'julia|julia-repl', include:'source.julia', contentName:'source.embedded.julia' }
{ pattern:'kotlin|kt|kts', include:'source.kotlin', contentName:'source.embedded.kotlin' }
{ pattern:'latex|tex', include:'text.tex.latex', contentName:'text.embedded.latex' }
{ pattern:'less', include:'source.css.less', contentName:'source.embedded.css.less' }
{ pattern:'lua' }
{ pattern:'make|makefile', include:'source.makefile', contentName:'source.embedded.makefile' }
{ pattern:'markdown|mdown|md', include:'text.md', contentName:'text.embedded.md' }
{ pattern:'m|mathematica', include:'source.mathematica', contentName:'source.embedded.mathematica' }
{ pattern:'mermaid' }
{ pattern:'mson', include:'text.html.markdown.source.gfm.mson', contentName:'source.embedded.mson' }
{ pattern:'objc|objective-c', include:'source.objc', contentName:'source.embedded.objc' }
{ pattern:'php', include:'text.html.php', contentName:'source.embedded.text.html.php' }
{ pattern:'py|python', include:'source.python', contentName:'source.embedded.python' }
{ pattern:'r' }
{ pattern:'ruby' }
{ pattern:'rust|rs', include:'source.rust', contentName:'source.embedded.rust' }
{ pattern:'sas' }
{ pattern:'sass' }
{ pattern:'scss', include:'source.css.scss', contentName:'source.embedded.css.scss' }
{ pattern:'sh|bash', include:'source.shell', contentName:'source.embedded.shell' }
{ pattern:'shellsession|console', include:'text.shell-session', contentName:'text.embedded.shell-session' }
{ pattern:'sql' }
{ pattern:'stata' }
{ pattern:'swift' }
{ pattern:'ts|typescript', include:'source.ts', contentName:'source.embedded.ts' }
{ pattern:'xml', include:'text.xml', contentName:'text.embedded.xml' }
{ pattern:'yaml' }
# NOTE: temporarily disabled, see issue #77 for details
# { pattern:'yaml|yml', include:'source.yaml' }
# Fallback that detects any unsupported languages;
# Pattern might have to accept more characters.
{
pattern: '[a-zA-Z0-9-_]+'
include: 'source'
contentName: 'source.embedded'
}
]