3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-13 04:08:29 +01:00

Answer architecture round 1: one owner for the image's ADF shape, the readings' decision, marker paragraphs, the exceptions the README names; items 87 filed and 56 widened

This commit is contained in:
2026-10-09 03:37:29 +02:00
committed by Lillem4n
parent 8370230fee
commit 88aef1c8c4
14 changed files with 81 additions and 52 deletions
+3 -2
View File
@@ -11,9 +11,10 @@ import { commonMarkToAdf, losslessMarkdownToAdf } from '../markdown/parse/markdo
const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'corpus', 'commonmark-spec')
const checks = ['count', 'fixpoint', 'text'] as const
const kinds = ['mark-model', 'node-model', 'pending'] as const
type Check = (typeof checks)[number]
type ExceptionKind = 'mark-model' | 'node-model' | 'pending'
type ExceptionKind = (typeof kinds)[number]
type SpecExample = { example: number; html: string; markdown: string; section: string }
@@ -30,7 +31,7 @@ function isCheck(value: unknown): value is Check {
}
function isKind(value: unknown): value is ExceptionKind {
return value === 'mark-model' || value === 'node-model' || value === 'pending'
return kinds.some((kind) => kind === value)
}
function isSpecExample(value: unknown): value is SpecExample {