mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 11:37:02 -04:00
Update CodeMirror to 5.13.5
This commit is contained in:
parent
edc3a31dfd
commit
8bf516263c
84 changed files with 2837 additions and 504 deletions
27
public/vendor/codemirror/mode/dart/dart.js
vendored
27
public/vendor/codemirror/mode/dart/dart.js
vendored
|
@ -72,6 +72,12 @@
|
|||
return null;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
"/": function(stream, state) {
|
||||
if (!stream.eat("*")) return false
|
||||
state.tokenize = tokenNestedComment(1)
|
||||
return state.tokenize(stream, state)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -121,6 +127,27 @@
|
|||
return "variable";
|
||||
}
|
||||
|
||||
function tokenNestedComment(depth) {
|
||||
return function (stream, state) {
|
||||
var ch
|
||||
while (ch = stream.next()) {
|
||||
if (ch == "*" && stream.eat("/")) {
|
||||
if (depth == 1) {
|
||||
state.tokenize = null
|
||||
break
|
||||
} else {
|
||||
state.tokenize = tokenNestedComment(depth - 1)
|
||||
return state.tokenize(stream, state)
|
||||
}
|
||||
} else if (ch == "/" && stream.eat("*")) {
|
||||
state.tokenize = tokenNestedComment(depth + 1)
|
||||
return state.tokenize(stream, state)
|
||||
}
|
||||
}
|
||||
return "comment"
|
||||
}
|
||||
}
|
||||
|
||||
CodeMirror.registerHelper("hintWords", "application/dart", keywords.concat(atoms).concat(builtins));
|
||||
|
||||
// This is needed to make loading through meta.js work.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue