line multi authors

This commit is contained in:
Mateusz Gruszczyński
2026-07-25 18:05:15 +02:00
parent 4c4c15495d
commit 1fcd6866f4
6 changed files with 158 additions and 77 deletions
+4
View File
@@ -92,6 +92,10 @@ export function replaceAuthorshipOwner(model, matcher, replacement, contentLengt
}
export function authorshipOwners(model) {
return [...new Set((model?.spans || []).map(span => span.owner).filter(Boolean))];
}
export function lineAuthors(content, model) {
const starts = [0];
for (let i = 0; i < content.length; i++) if (content.charCodeAt(i) === 10) starts.push(i + 1);