MCPcopy Create free account
hub / github.com/TruthHun/BookStack / setGuttersForLineNumbers

Function setGuttersForLineNumbers

static/mergely/lib/codemirror.js:370–378  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

368 // Make sure the gutters options contains the element
369 // "CodeMirror-linenumbers" when the lineNumbers option is true.
370 function setGuttersForLineNumbers(options) {
371 var found = indexOf(options.gutters, "CodeMirror-linenumbers");
372 if (found == -1 && options.lineNumbers) {
373 options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]);
374 } else if (found > -1 && !options.lineNumbers) {
375 options.gutters = options.gutters.slice(0);
376 options.gutters.splice(found, 1);
377 }
378 }
379
380 // SCROLLBARS
381

Callers 2

CodeMirrorFunction · 0.70
codemirror.jsFile · 0.70

Calls 1

indexOfFunction · 0.70

Tested by

no test coverage detected