diff --git a/static/js/note-editor.js b/static/js/note-editor.js
index 4df9df8..9bd44c8 100644
--- a/static/js/note-editor.js
+++ b/static/js/note-editor.js
@@ -63,12 +63,26 @@ function renderGutter() {
const top = paddingTop - editor.scrollTop;
ownerLabels.innerHTML = `${escapeHtml(ownerName(owner))}`;
} else {
+ let previousAuthorSignature = null;
ownerLabels.innerHTML = lines.map((_, i) => {
const authors = authorsByLine[i] || [];
if (!authors.length) return "";
+
const top = paddingTop + i * lineHeight - editor.scrollTop;
- const badges = authors.map(owner => `${escapeHtml(ownerName(owner))}`).join("");
- return `${badges}`;
+ const signature = authors
+ .map(owner => ownerName(owner))
+ .sort((a, b) => a.localeCompare(b))
+ .join("\u0000");
+ const startsOwnershipBlock = signature !== previousAuthorSignature;
+ previousAuthorSignature = signature;
+
+ const lineMarker = ``;
+ if (!startsOwnershipBlock) return lineMarker;
+
+ const badges = authors
+ .map(owner => `${escapeHtml(ownerName(owner))}`)
+ .join("");
+ return `${lineMarker}${badges}`;
}).join("");
}
if (showAuthorship) renderAuthorshipLayer(authorshipLayer, editor, authorship, colorFor);