3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 06:35:44 +01:00

12c: the block directive forms read and spell !adf: openers and closers

This commit is contained in:
2026-09-16 15:46:52 +02:00
parent 22bbd8c721
commit 0eb2665ffe
83 changed files with 808 additions and 819 deletions
+9
View File
@@ -0,0 +1,9 @@
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'
}