mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 22:55:44 +01:00
Answer architecture round 1: the claims type pins what every writer spells, the HTML calls take flavour names, model-written GFM reads in portableMarkdownToAdf
This commit is contained in:
@@ -15,7 +15,11 @@ export type Claims = {
|
||||
taskMarkers: boolean
|
||||
}
|
||||
|
||||
export const flavourClaims: Readonly<Record<Flavour, Claims>> = {
|
||||
// The writer spells pipe tables and `~~` in every flavour it writes.
|
||||
type WrittenClaims = Claims & { pipeTables: true; strikethrough: true }
|
||||
|
||||
// No flavour claims directives beside alerts or highlights: an expand directive leaves `inExpand` unset and a directive's slot reads `==`.
|
||||
export const flavourClaims: Readonly<{ commonmark: Claims } & Record<WrittenFlavour, WrittenClaims>> = {
|
||||
commonmark: { alerts: false, carryFence: false, directives: false, highlights: false, pipeTables: false, strikethrough: false, taskMarkers: false },
|
||||
lossless: { alerts: false, carryFence: true, directives: true, highlights: false, pipeTables: true, strikethrough: true, taskMarkers: false },
|
||||
portable: { alerts: true, carryFence: false, directives: false, highlights: true, pipeTables: true, strikethrough: true, taskMarkers: true },
|
||||
|
||||
Reference in New Issue
Block a user