Files
adf-codec/src/markdown/block-directive-forms.ts
T
lilleman 5bec3fbbb6
CI / gate (push) Successful in 26s
CI / publish (push) Has been skipped
12c: the block directive forms read and spell !adf: openers and closers
2026-09-16 15:46:52 +02:00

10 lines
395 B
TypeScript

import { blockDirective } from '../adf/block-directives.ts'
import { listBreakName } from './list-break.ts'
export function blockDirectiveForm(name: string): 'container' | 'leaf' | undefined {
if (name === listBreakName) return 'leaf'
const directive = blockDirective(name)
if (directive === undefined) return undefined
return directive.contentModel === 'none' ? 'leaf' : 'container'
}