Update CodeMirror to version 5.49.0 (#8381)
* Update CodeMirror to version 5.49.0 * Update CodeMirror versions in librejs and VERSIONS
This commit is contained in:
parent
6fa14ac3c8
commit
1e9b330525
352 changed files with 14625 additions and 2451 deletions
|
@ -1,5 +1,5 @@
|
|||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
/*
|
||||
* =====================================================================================
|
||||
|
@ -9,7 +9,7 @@
|
|||
* Description: CodeMirror mode for Asterisk dialplan
|
||||
*
|
||||
* Created: 05/17/2012 09:20:25 PM
|
||||
* Revision: none
|
||||
* Revision: 08/05/2019 AstLinux Project: Support block-comments
|
||||
*
|
||||
* Author: Stas Kobzar (stas@modulis.ca),
|
||||
* Company: Modulis.ca Inc.
|
||||
|
@ -67,7 +67,26 @@ CodeMirror.defineMode("asterisk", function() {
|
|||
var cur = '';
|
||||
var ch = stream.next();
|
||||
// comment
|
||||
if (state.blockComment) {
|
||||
if (ch == "-" && stream.match("-;", true)) {
|
||||
state.blockComment = false;
|
||||
} else if (stream.skipTo("--;")) {
|
||||
stream.next();
|
||||
stream.next();
|
||||
stream.next();
|
||||
state.blockComment = false;
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
}
|
||||
return "comment";
|
||||
}
|
||||
if(ch == ";") {
|
||||
if (stream.match("--", true)) {
|
||||
if (!stream.match("-", false)) { // Except ;--- is not a block comment
|
||||
state.blockComment = true;
|
||||
return "comment";
|
||||
}
|
||||
}
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
}
|
||||
|
@ -124,6 +143,7 @@ CodeMirror.defineMode("asterisk", function() {
|
|||
return {
|
||||
startState: function() {
|
||||
return {
|
||||
blockComment: false,
|
||||
extenStart: false,
|
||||
extenSame: false,
|
||||
extenInclude: false,
|
||||
|
@ -187,7 +207,11 @@ CodeMirror.defineMode("asterisk", function() {
|
|||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
blockCommentStart: ";--",
|
||||
blockCommentEnd: "--;",
|
||||
lineComment: ";"
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue