mirror of
https://github.com/documize/community.git
synced 2025-08-04 13:05:23 +02:00
CodeMirror dependency upgraded to v5.32.0
For handling Markdown and Code section types
This commit is contained in:
parent
3337db6b27
commit
0336f84a83
351 changed files with 3408 additions and 1945 deletions
4
gui/public/codemirror/mode/go/go.js
vendored
Executable file → Normal file
4
gui/public/codemirror/mode/go/go.js
vendored
Executable file → Normal file
|
@ -155,14 +155,14 @@ CodeMirror.defineMode("go", function(config) {
|
|||
else if (curPunc == "[") pushContext(state, stream.column(), "]");
|
||||
else if (curPunc == "(") pushContext(state, stream.column(), ")");
|
||||
else if (curPunc == "case") ctx.type = "case";
|
||||
else if (curPunc == "}" && ctx.type == "}") ctx = popContext(state);
|
||||
else if (curPunc == "}" && ctx.type == "}") popContext(state);
|
||||
else if (curPunc == ctx.type) popContext(state);
|
||||
state.startOfLine = false;
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize != tokenBase && state.tokenize != null) return 0;
|
||||
if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
|
||||
var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
|
||||
if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) {
|
||||
state.context.type = "}";
|
||||
|
|
0
gui/public/codemirror/mode/go/index.html
vendored
Executable file → Normal file
0
gui/public/codemirror/mode/go/index.html
vendored
Executable file → Normal file
Loading…
Add table
Add a link
Reference in a new issue