1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-03 20:45:26 +02:00

upgraded libs and improved Markdown editing experience

This commit is contained in:
Harvey Kandola 2017-03-13 15:40:28 +00:00
parent 2e146cf767
commit ea1a8000ee
165 changed files with 15930 additions and 19013 deletions

View file

@ -24,7 +24,7 @@ CodeMirror.defineMode("pegjs", function (config) {
inString: false,
stringType: null,
inComment: false,
inChracterClass: false,
inCharacterClass: false,
braced: 0,
lhs: true,
localState: null
@ -66,22 +66,22 @@ CodeMirror.defineMode("pegjs", function (config) {
}
}
return "comment";
} else if (state.inChracterClass) {
while (state.inChracterClass && !stream.eol()) {
} else if (state.inCharacterClass) {
while (state.inCharacterClass && !stream.eol()) {
if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) {
state.inChracterClass = false;
state.inCharacterClass = false;
}
}
} else if (stream.peek() === '[') {
stream.next();
state.inChracterClass = true;
state.inCharacterClass = true;
return 'bracket';
} else if (stream.match(/^\/\//)) {
stream.skipToEnd();
return "comment";
} else if (state.braced || stream.peek() === '{') {
if (state.localState === null) {
state.localState = jsMode.startState();
state.localState = CodeMirror.startState(jsMode);
}
var token = jsMode.token(stream, state.localState);
var text = stream.current();