mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
updated codemirror to 5.57.0
This commit is contained in:
17
libraries/codemirror/mode/pascal/pascal.js
vendored
17
libraries/codemirror/mode/pascal/pascal.js
vendored
@@ -50,7 +50,11 @@ CodeMirror.defineMode("pascal", function() {
|
||||
state.tokenize = tokenComment;
|
||||
return tokenComment(stream, state);
|
||||
}
|
||||
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
||||
if (ch == "{") {
|
||||
state.tokenize = tokenCommentBraces;
|
||||
return tokenCommentBraces(stream, state);
|
||||
}
|
||||
if (/[\[\]\(\),;\:\.]/.test(ch)) {
|
||||
return null;
|
||||
}
|
||||
if (/\d/.test(ch)) {
|
||||
@@ -98,6 +102,17 @@ CodeMirror.defineMode("pascal", function() {
|
||||
return "comment";
|
||||
}
|
||||
|
||||
function tokenCommentBraces(stream, state) {
|
||||
var ch;
|
||||
while (ch = stream.next()) {
|
||||
if (ch == "}") {
|
||||
state.tokenize = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "comment";
|
||||
}
|
||||
|
||||
// Interface
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user