3
// Ignore comments starting with { to privilege string interpolation highlighting
4
var comment = /#(?!\{).+/,
10
Prism.languages.coffeescript = Prism.languages.extend('javascript', {
14
// Strings are multiline
18
// Strings are multiline
19
pattern: /"(?:\\?[^\\])*?"/,
21
'interpolation': interpolation
25
'keyword': /\b(and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
27
pattern: /@(?!\d)\w+/,
32
Prism.languages.insertBefore('coffeescript', 'comment', {
33
'multiline-comment': {
34
pattern: /###[\s\S]+?###/,
38
// Block regexp can contain comments and interpolation
40
pattern: /\/{3}[\s\S]*?\/{3}/,
44
'interpolation': interpolation
49
Prism.languages.insertBefore('coffeescript', 'string', {
50
'inline-javascript': {
51
pattern: /`(?:\\?[\s\S])*?`/,
57
rest: Prism.languages.javascript
64
pattern: /'''[\s\S]*?'''/,
68
pattern: /"""[\s\S]*?"""/,
71
interpolation: interpolation
78
Prism.languages.insertBefore('coffeescript', 'keyword', {
80
'property': /(?!\d)\w+(?=\s*:(?!:))/
b'\\ No newline at end of file'