Answer the architecture review: emit-only spellings move down, and the tables drop markdown's words
CI / gate (push) Successful in 5s

This commit is contained in:
2026-08-27 22:37:11 +02:00
parent e580eec09b
commit 559922e327
14 changed files with 125 additions and 82 deletions
+5
View File
@@ -3,6 +3,7 @@ import type { VocabularyPair } from '../adf/attribute-vocabulary.ts'
import { serializeCanonicalJson } from '../canonical-json.ts'
const bareToken = /^[A-Za-z0-9_-]+$/
const inlineDirectiveOpener = /^:[a-z][A-Za-z0-9]*[[{]/
// spec/flavour.md, Attributes.
const quotedEscapes = /[&<`|]/g
@@ -11,6 +12,10 @@ export function isBareToken(text: string): boolean {
return bareToken.test(text)
}
export function opensInlineDirective(text: string): boolean {
return inlineDirectiveOpener.test(text)
}
export function spellAttributes(pairs: readonly (readonly [string, string])[]): string {
if (pairs.length === 0) return ''
const spelled = [...pairs].sort(([left], [right]) => (left < right ? -1 : 1)).map(([key, value]) => `${key}=${value}`)