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

Function lineStart

static/editor.md/lib/codemirror/lib/codemirror.js:8374–8381  ·  view source on GitHub ↗
(cm, lineN)

Source from the content-addressed store, hash-verified

8372 }
8373
8374 function lineStart(cm, lineN) {
8375 var line = getLine(cm.doc, lineN);
8376 var visual = visualLine(line);
8377 if (visual != line) lineN = lineNo(visual);
8378 var order = getOrder(visual);
8379 var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
8380 return Pos(lineN, ch);
8381 }
8382 function lineEnd(cm, lineN) {
8383 var merged, line = getLine(cm.doc, lineN);
8384 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