describe("check-no-conflict-markers", () => {
it("finds git conflict markers at the start of lines", () => {
expect(
findConflictMarkerLines(
[ "const ok = true;", "<<<<<<< HEAD", "value = left;", "=======", "value = right;", ">>>>>>> main",
].join("\n"),
),
).toEqual([2, 4, 6]);
});
it("ignores marker-like text when it is indented or inline", () => {
expect(
findConflictMarkerLines(
["Example:", " <<<<<<< HEAD", "const text = '======= not a conflict';"].join("\n"),
),
).toEqual([]);
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.