12c: the block directive forms read and spell !adf: openers and closers
This commit is contained in:
@@ -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'
|
||||
}
|
||||
Reference in New Issue
Block a user