Locally add prismjs
This commit is contained in:
parent
35af792c6a
commit
6aa044cf9b
701 changed files with 35787 additions and 0 deletions
50
node_modules/prismjs/components/prism-scala.js
generated
vendored
Normal file
50
node_modules/prismjs/components/prism-scala.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
Prism.languages.scala = Prism.languages.extend('java', {
|
||||
'triple-quoted-string': {
|
||||
pattern: /"""[\s\S]*?"""/,
|
||||
greedy: true,
|
||||
alias: 'string'
|
||||
},
|
||||
'string': {
|
||||
pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
||||
greedy: true
|
||||
},
|
||||
'keyword': /<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,
|
||||
'number': /\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,
|
||||
'builtin': /\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,
|
||||
'symbol': /'[^\d\s\\]\w*/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('scala', 'triple-quoted-string', {
|
||||
'string-interpolation': {
|
||||
pattern: /\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,
|
||||
greedy: true,
|
||||
inside: {
|
||||
'id': {
|
||||
pattern: /^\w+/,
|
||||
greedy: true,
|
||||
alias: 'function'
|
||||
},
|
||||
'escape': {
|
||||
pattern: /\\\$"|\$[$"]/,
|
||||
greedy: true,
|
||||
alias: 'symbol'
|
||||
},
|
||||
'interpolation': {
|
||||
pattern: /\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
|
||||
greedy: true,
|
||||
inside: {
|
||||
'punctuation': /^\$\{?|\}$/,
|
||||
'expression': {
|
||||
pattern: /[\s\S]+/,
|
||||
inside: Prism.languages.scala
|
||||
}
|
||||
}
|
||||
},
|
||||
'string': /[\s\S]+/
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
delete Prism.languages.scala['class-name'];
|
||||
delete Prism.languages.scala['function'];
|
||||
delete Prism.languages.scala['constant'];
|
Loading…
Add table
Add a link
Reference in a new issue