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

Answer architecture round 1: 2 🔴, 6 🟡 (0 misread); carried JSON read through adf/, one spelling home per element in html/, block readers in one table, the first paragraph's form shared, a lint boundary for html/parse, a strictness oracle

This commit is contained in:
2026-10-26 22:46:02 +01:00
committed by Lillem4n
parent 51e37f68df
commit e39ca86d74
24 changed files with 425 additions and 190 deletions
+15
View File
@@ -0,0 +1,15 @@
// The element each mark but a link writes around text, holding no attribute; a link writes `<a>`.
const markElements: ReadonlyMap<string, string> = new Map([
['code', 'code'],
['em', 'em'],
['strong', 'strong'],
])
export function elementOfMark(type: string): string | undefined {
return markElements.get(type)
}
export function markOfElement(name: string): string | undefined {
for (const [type, element] of markElements) if (element === name) return type
return undefined
}