MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / markTextShared

Function markTextShared

static/js/codemirror/codemirror.js:3539–3550  ·  view source on GitHub ↗
(doc, from, to, options, type)

Source from the content-addressed store, hash-verified

3537 };
3538
3539 function markTextShared(doc, from, to, options, type) {
3540 options = copyObj(options);
3541 options.shared = false;
3542 var markers = [markText(doc, from, to, options, type)], primary = markers[0];
3543 linkedDocs(doc, function(doc) {
3544 markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
3545 for (var i = 0; i < doc.linked.length; ++i)
3546 if (doc.linked[i].isParent) return;
3547 primary = lst(markers);
3548 });
3549 return new SharedTextMarker(markers, primary);
3550 }
3551
3552 // TEXTMARKER SPANS
3553

Callers 1

markTextFunction · 0.85

Calls 6

copyObjFunction · 0.85
markTextFunction · 0.85
linkedDocsFunction · 0.85
clipPosFunction · 0.85
lstFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected