diff --git a/AGENTS.md b/AGENTS.md index cf7d219..ba7aa61 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,7 @@ In `docs/decisions.md`: - Firefox reads the build - The coverage floors - The size ratchet -- The project ships under the comprehension floor until items 59, 60 and 62 land +- The project ships under the comprehension floor until items 59, 60, 62 and 95 land - Properties on a fixed seed - The CommonMark suite checks three ways - The flavour spec is read as a source diff --git a/docs/decisions.md b/docs/decisions.md index da52430..5076e72 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -570,10 +570,10 @@ config gone missing fails the leg instead of falling back to oxlint's own defaul `--deny-warnings`, since a rule from a category this config never names arrives as a warning it exits 0 on. -## The project ships under the comprehension floor until items 59, 60 and 62 land +## The project ships under the comprehension floor until items 59, 60, 62 and 95 land 2026-10-03, the maintainer. KISS, a technical principle, and its comprehension floor of 7. Valid -while `todo.md` items 59, 60 and 62 are open. +while `todo.md` items 59, 60, 62 and 95 are open. A four-seat comprehension panel scored the project under the floor of 7. Its scoring run of 2026-10-08 is the baseline. Since 2026-10-04, a chunk whose panel scores any diff --git a/src/markdown/directive-syntax.ts b/src/markdown/directive-syntax.ts index 6f16120..32d3460 100644 --- a/src/markdown/directive-syntax.ts +++ b/src/markdown/directive-syntax.ts @@ -75,10 +75,6 @@ export function claimDirectivePrefix(text: string, index: number): ClaimedPrefix return claimsDirectivePrefix(text, index) ? { [claimedPrefix]: true, index } : undefined } -export function claimsDirectivePrefix(text: string, index: number): boolean { - return text.startsWith(directivePrefix, index) -} - export function holdsDirectivePrefix(text: string): boolean { return text.includes(directivePrefix) } @@ -164,6 +160,10 @@ export function unsupportedNodeShape(message: string): ConvertFault { return { code: 'unsupported-node-shape', message } } +function claimsDirectivePrefix(text: string, index: number): boolean { + return text.startsWith(directivePrefix, index) +} + function keyOrder(left: string, right: string): number { if (left < right) return -1 return left > right ? 1 : 0 diff --git a/src/markdown/parse/inline-content.ts b/src/markdown/parse/inline-content.ts index 023c48a..21a33f6 100644 --- a/src/markdown/parse/inline-content.ts +++ b/src/markdown/parse/inline-content.ts @@ -119,7 +119,7 @@ function scanInline(scan: Scan): Result { } function readToken(scan: Scan, index: number, token: InlineToken): Result { - if (token.kind === 'directive') return readDirective(scan, index, token.prefix) + if (token.kind === 'directive') return readDirective(scan, token.prefix) if (token.kind === 'html') return failure('unmappable-html', `no raw HTML converts at this version: ${token.construct}`, scan.path) const end = index + token.width switch (token.kind) { @@ -168,12 +168,12 @@ function readLineEnding(scan: Scan, index: number): number { return index + 1 } -function readDirective(scan: Scan, index: number, prefix: ClaimedPrefix): Result { - const held = scan.spans.get(index) - if (held !== undefined) return pushDirective(scan, held, index) +function readDirective(scan: Scan, prefix: ClaimedPrefix): Result { + const held = scan.spans.get(prefix.index) + if (held !== undefined) return pushDirective(scan, held, prefix.index) const directive = readInlineDirective(scan.source, prefix) if (directive.fault !== undefined) return faulted(directive.fault, scan.path) - return pushDirective(scan, directive.value, index) + return pushDirective(scan, directive.value, prefix.index) } function pushDirective(scan: Scan, span: DirectiveSpan, index: number): Result { diff --git a/todo.md b/todo.md index e7d8faf..2564b20 100644 --- a/todo.md +++ b/todo.md @@ -52,7 +52,7 @@ | 52 | 0.3.0 | | **Spell `colwidth` as a comma list, `colwidth="340,420"`.** | 3 | 3 | 5 | 6 | 6 | 11.5 | | 51 | 0.3.0 | | **Match a reference label to its definition under Unicode case folding.** | 2 | 2 | 2 | 7 | 4, 5 | 10.9 | | 53 | 0.3.0 | | **Put a block's `marks` spelling to the writer panel and adopt its pick.** | 4 | 5 | 5 | 6 | 6 | 10.0 | -| 95 | 0.3.0 | | **Find the code-span closers an escape forms and the mark runs a line cannot spell by reading the line back, in place of `escapeClosedRuns` and `unspellableRuns` predicting them.** | 5 | 6 | 2 | 6 | 1 | 9.5 | +| 95 | 0.3.0 | decision | **Find the code-span closers an escape forms and the mark runs a line cannot spell by reading the line back, in place of `escapeClosedRuns` and `unspellableRuns` predicting them.** | 5 | 6 | 2 | 6 | 1 | 9.5 | | 91 | 0.3.0 | | **Spell an emphasis or link once across the hard breaks between two nodes it marks, in both writers.** | 5 | 5 | 5 | 6 | 6 | 9.0 | | 73 | 0.4.0 | | **Announce the package where someone needing an ADF converter already reads: JRACLOUD-77436, the Atlassian developer community and Stack Overflow's ADF-to-markdown questions.** | 1 | 2 | 6 | 8 | 3 | 23.0 | | 9 | 0.4.0 | | **Ship an online sandbox: a web page with two textboxes converting between ADF and markdown on the library's browser build.** | 2 | 6 | 6 | 8 | 3 | 21.0 |