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

Function removeMarkedSpan

static/editor.md/lib/codemirror/lib/codemirror.js:6120–6124  ·  view source on GitHub ↗
(spans, span)

Source from the content-addressed store, hash-verified

6118 // Remove a span from an array, returning undefined if no spans are
6119 // left (we don't store arrays for lines without spans).
6120 function removeMarkedSpan(spans, span) {
6121 for (var r, i = 0; i < spans.length; ++i)
6122 if (spans[i] != span) (r || (r = [])).push(spans[i]);
6123 return r;
6124 }
6125 // Add a span to a line.
6126 function addMarkedSpan(line, span) {
6127 line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];

Callers 1

codemirror.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected