mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
ckeditor 5.60.0
This commit is contained in:
14
libraries/codemirror/mode/ebnf/ebnf.js
vendored
14
libraries/codemirror/mode/ebnf/ebnf.js
vendored
@@ -41,10 +41,10 @@
|
||||
state.stringType = stream.peek();
|
||||
stream.next(); // Skip quote
|
||||
state.stack.unshift(stateType._string);
|
||||
} else if (stream.match(/^\/\*/)) { //comments starting with /*
|
||||
} else if (stream.match('/*')) { //comments starting with /*
|
||||
state.stack.unshift(stateType.comment);
|
||||
state.commentType = commentType.slash;
|
||||
} else if (stream.match(/^\(\*/)) { //comments starting with (*
|
||||
} else if (stream.match('(*')) { //comments starting with (*
|
||||
state.stack.unshift(stateType.comment);
|
||||
state.commentType = commentType.parenthesis;
|
||||
}
|
||||
@@ -69,10 +69,10 @@
|
||||
|
||||
case stateType.comment:
|
||||
while (state.stack[0] === stateType.comment && !stream.eol()) {
|
||||
if (state.commentType === commentType.slash && stream.match(/\*\//)) {
|
||||
if (state.commentType === commentType.slash && stream.match('*/')) {
|
||||
state.stack.shift(); // Clear flag
|
||||
state.commentType = null;
|
||||
} else if (state.commentType === commentType.parenthesis && stream.match(/\*\)/)) {
|
||||
} else if (state.commentType === commentType.parenthesis && stream.match('*)')) {
|
||||
state.stack.shift(); // Clear flag
|
||||
state.commentType = null;
|
||||
} else {
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
case stateType.characterClass:
|
||||
while (state.stack[0] === stateType.characterClass && !stream.eol()) {
|
||||
if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) {
|
||||
if (!(stream.match(/^[^\]\\]+/) || stream.match('.'))) {
|
||||
state.stack.shift();
|
||||
}
|
||||
}
|
||||
@@ -168,10 +168,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (stream.match(/^\/\//)) {
|
||||
if (stream.match('//')) {
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
} else if (stream.match(/return/)) {
|
||||
} else if (stream.match('return')) {
|
||||
return "operator";
|
||||
} else if (stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)) {
|
||||
if (stream.match(/(?=[\(.])/)) {
|
||||
|
||||
Reference in New Issue
Block a user