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

Function lineStart

static/mergely/lib/codemirror.js:8617–8624  ·  view source on GitHub ↗
(cm, lineN)

Source from the content-addressed store, hash-verified

8615 }
8616
8617 function lineStart(cm, lineN) {
8618 var line = getLine(cm.doc, lineN);
8619 var visual = visualLine(line);
8620 if (visual != line) lineN = lineNo(visual);
8621 var order = getOrder(visual);
8622 var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
8623 return Pos(lineN, ch);
8624 }
8625 function lineEnd(cm, lineN) {
8626 var merged, line = getLine(cm.doc, lineN);
8627 while (merged = collapsedSpanAtEnd(line)) {

Callers 2

codemirror.jsFile · 0.70
lineStartSmartFunction · 0.70

Calls 6

getLineFunction · 0.70
visualLineFunction · 0.70
lineNoFunction · 0.70
getOrderFunction · 0.70
lineRightFunction · 0.70
lineLeftFunction · 0.70

Tested by

no test coverage detected