mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-21 15:42:58 +01:00
Answer architecture round 2: the spelling memo, headroom and the escaped backtick lengths state their rule at the code, and the highlight counter is named for what it counts
This commit is contained in:
@@ -124,6 +124,7 @@ function claimsHighlight(scan: string, index: number): boolean {
|
||||
// CommonMark reads no escape inside a code span, so a backtick string an escape forms or splits off still closes one an earlier bare run opens.
|
||||
function escapeClosedRuns(scan: string, escapings: readonly InlineEscaping[], claimed: ReadonlySet<number>): ReadonlySet<number> {
|
||||
const escaped = new Set(claimed)
|
||||
// The lengths of the backtick strings an escape forms or splits off: a bare run that long closes the span one opens.
|
||||
const formed = new Set<number>()
|
||||
let end = scan.length - 1
|
||||
while (end >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user