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

Function lineIsHiddenInner

static/editor.md/lib/codemirror/lib/codemirror.js:6414–6428  ·  view source on GitHub ↗
(doc, line, span)

Source from the content-addressed store, hash-verified

6412 }
6413 }
6414 function lineIsHiddenInner(doc, line, span) {
6415 if (span.to == null) {
6416 var end = span.marker.find(1, true);
6417 return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker));
6418 }
6419 if (span.marker.inclusiveRight && span.to == line.text.length)
6420 return true;
6421 for (var sp, i = 0; i < line.markedSpans.length; ++i) {
6422 sp = line.markedSpans[i];
6423 if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
6424 (sp.to == null || sp.to != span.from) &&
6425 (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
6426 lineIsHiddenInner(doc, line, sp)) return true;
6427 }
6428 }
6429
6430 // LINE WIDGETS
6431

Callers 1

lineIsHiddenFunction · 0.70

Calls 1

getMarkedSpanForFunction · 0.70

Tested by

no test coverage detected