26 - the container stack owns the directive depths, and the escape claim hands over after it records
CI / gate (push) Successful in 30s
CI / publish (push) Successful in 5s

This commit was merged in pull request #125.
This commit is contained in:
2026-09-24 00:02:58 +02:00
parent 15fb7fca81
commit d5370b126d
3 changed files with 13 additions and 11 deletions
+3 -2
View File
@@ -91,14 +91,15 @@ function escapeClaims(scan: string, escapings: readonly InlineEscaping[], contai
if (index > line.start + line.text.length) line = scanLine(scan, line.start + line.text.length + 1)
const escaping = escapings[index]
const escapable = escaping === 'backslash' || escaping === 'bracketed'
afterEscape =
const claimed: boolean =
(escapable &&
(claimsLineStart(line, index, container) ||
mergesWithSyntax(scan, escapings, index) ||
opensConstruct(scan, linkClose, index, escaping === 'bracketed', container, afterEscape))) ||
(escaping === 'bracketed-link-target' &&
((scan.charAt(index) === '`' && opensCodeSpan(scan, index, afterEscape)) || claimsDirectivePrefix(scan, index)))
if (afterEscape) escaped.add(index)
if (claimed) escaped.add(index)
afterEscape = claimed
}
return escaped
}