update to higlight.js 8.4
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: C#
|
||||
Author: Jason Diamond <jason@diamond.name>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -8,13 +9,15 @@ function(hljs) {
|
||||
// Normal keywords.
|
||||
'abstract as base bool break byte case catch char checked const continue decimal ' +
|
||||
'default delegate do double else enum event explicit extern false finally fixed float ' +
|
||||
'for foreach goto if implicit in int interface internal is lock long new null ' +
|
||||
'object operator out override params private protected public readonly ref return sbyte ' +
|
||||
'sealed short sizeof stackalloc static string struct switch this throw true try typeof ' +
|
||||
'uint ulong unchecked unsafe ushort using virtual volatile void while async await ' +
|
||||
'for foreach goto if implicit in int interface internal is lock long null ' +
|
||||
'object operator out override params private protected public readonly ref sbyte ' +
|
||||
'sealed short sizeof stackalloc static string struct switch this true try typeof ' +
|
||||
'uint ulong unchecked unsafe ushort using virtual volatile void while async ' +
|
||||
'protected public private internal ' +
|
||||
// Contextual keywords.
|
||||
'ascending descending from get group into join let orderby partial select set value var ' +
|
||||
'where yield';
|
||||
var GENERIC_IDENT_RE = hljs.IDENT_RE + '(<' + hljs.IDENT_RE + '>)?';
|
||||
return {
|
||||
aliases: ['csharp'],
|
||||
keywords: KEYWORDS,
|
||||
@@ -56,21 +59,45 @@ function(hljs) {
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
beginKeywords: 'protected public private internal', end: /[{;=]/,
|
||||
beginKeywords: 'class namespace interface', end: /[{;=]/,
|
||||
illegal: /[^\s:]/,
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
// Expression keywords prevent 'keyword Name(...)' from being
|
||||
// recognized as a function definition
|
||||
beginKeywords: 'new return throw await',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: '(' + GENERIC_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/,
|
||||
excludeEnd: true,
|
||||
keywords: KEYWORDS,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'class namespace interface',
|
||||
starts: {
|
||||
contains: [hljs.TITLE_MODE]
|
||||
}
|
||||
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
contains: [hljs.TITLE_MODE],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: KEYWORDS,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
hljs.TITLE_MODE
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user