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

Function endOfLineClean

static/editor.md/lib/codemirror/addon/merge/merge.js:592–599  ·  view source on GitHub ↗
(diff, i)

Source from the content-addressed store, hash-verified

590 }
591
592 function endOfLineClean(diff, i) {
593 if (i == diff.length - 1) return true;
594 var next = diff[i + 1][1];
595 if (next.length == 1 || next.charCodeAt(0) != 10) return false;
596 if (i == diff.length - 2) return true;
597 next = diff[i + 2][1];
598 return next.length > 1 && next.charCodeAt(0) == 10;
599 }
600
601 function startOfLineClean(diff, i) {
602 if (i == 0) return true;

Callers 2

markChangesFunction · 0.85
getChunksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected