Skip to content

Commit

Permalink
update CodeMirror script editor to latest 5.65.18 version.
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Oct 11, 2024
1 parent 4b4dba9 commit 2a18bc9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className)
var re = bracketRegex(config)

// A cursor is defined as between two characters, but in in vim command mode
// A cursor is defined as between two characters, but in vim command mode
// (i.e. not insert mode), the cursor is visually represented as a
// highlighted box on top of the 2nd character. Otherwise, we allow matches
// from before or after the cursor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3425,7 +3425,7 @@
}

// Compute the lines that are visible in a given viewport (defaults
// the the current scroll position). viewport may contain top,
// the current scroll position). viewport may contain top,
// height, and ensure (see op.scrollToPos) properties.
function visibleLines(display, doc, viewport) {
var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
Expand Down Expand Up @@ -9877,7 +9877,7 @@

addLegacyProps(CodeMirror);

CodeMirror.version = "5.65.17";
CodeMirror.version = "5.65.18";

return CodeMirror;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ CodeMirror.defineMode("clojure", function (options) {
},

closeBrackets: {pairs: "()[]{}\"\""},
fold: "brace",
lineComment: ";;"
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
blockKeywords: set(blockKeywords),
builtin: set(builtins),
atoms: set(atoms),
// clike numbers without the suffixes, and with '_' separators.
number: /^(?:0x[a-f\d_]+|(?:[\d_]+\.?[\d_]*|\.[\d_]+)(?:e[-+]?[\d_]+)?)/i,
hooks: {
"@": function(stream) {
stream.eatWhile(/[\w\$_\.]/);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ CodeMirror.defineMode("groovy", function(config) {

function tokenVariableDeref(stream, state) {
var next = stream.match(/^(\.|[\w\$_]+)/)
if (!next) {
state.tokenize.pop()
return state.tokenize[state.tokenize.length-1](stream, state)
}
if (!next || !stream.match(next[0] == "." ? /^[\w$_]/ : /^\./)) state.tokenize.pop()
if (!next) return state.tokenize[state.tokenize.length-1](stream, state)
return next[0] == "." ? null : "variable"
}

Expand Down

0 comments on commit 2a18bc9

Please sign in to comment.