mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 19:38:20 -07:00
30 lines
816 B
JavaScript
30 lines
816 B
JavaScript
Prism.languages.clike = {
|
|
'comment': [
|
|
{
|
|
pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
|
|
lookbehind: true
|
|
},
|
|
{
|
|
pattern: /(^|[^\\:])\/\/.*/,
|
|
lookbehind: true
|
|
}
|
|
],
|
|
'string': {
|
|
pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
greedy: true
|
|
},
|
|
'class-name': {
|
|
pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
|
|
lookbehind: true,
|
|
inside: {
|
|
punctuation: /(\.|\\)/
|
|
}
|
|
},
|
|
'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
|
|
'boolean': /\b(true|false)\b/,
|
|
'function': /[a-z0-9_]+(?=\()/i,
|
|
'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
|
|
'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
|
|
'punctuation': /[{}[\];(),.:]/
|
|
};
|