updated codemirror to 5.57.0

This commit is contained in:
zadam
2020-09-20 21:41:40 +02:00
parent 7f9bcc162e
commit 71323500b7
36 changed files with 1104 additions and 700 deletions

View File

@@ -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 {