docs: explain collision-free Markdown prefix length

This commit is contained in:
Neil
2026-09-05 15:14:34 -07:00
parent f7bce308d9
commit bb782e00cc
@@ -212,6 +212,7 @@ function codePlaceholderPrefix(content: string): string {
while (content[cursor] === '_') {
cursor += 1
}
// One extra underscore keeps the prefix longer than every authored run.
suffixLength = Math.max(suffixLength, cursor - suffixStart + 1)
}
return CODE_PLACEHOLDER_PREFIX_BASE + '_'.repeat(suffixLength)