3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 07:05:44 +01:00

Read a list whose bullet or ordered delimiter changes as two lists, and alternate the marker between adjacent lists in place of !adf:listBreak

This commit is contained in:
2026-10-09 14:50:50 +02:00
committed by Lillem4n
parent 875c0e5335
commit 40580e6948
26 changed files with 179 additions and 244 deletions
+1 -5
View File
@@ -21,10 +21,6 @@ export const documentAttribute = { key: 'content', value: 'none' }
export const documentSpelling = spellDirectiveOpener(documentName, undefined, spellAttributes([[documentAttribute.key, documentAttribute.value]]))
export const listBreakName = 'listBreak'
export const listBreakSpelling = spellDirectiveOpener(listBreakName, undefined, '')
export const marksAttribute = 'marks'
export function blockArgument(type: string): string | undefined {
@@ -32,7 +28,7 @@ export function blockArgument(type: string): string | undefined {
}
export function blockDirectiveForm(name: string): 'container' | 'leaf' | undefined {
if (name === listBreakName || name === documentName) return 'leaf'
if (name === documentName) return 'leaf'
const model = blockNodeModel(name)
if (model === undefined) return undefined
return model.contentModel === 'none' ? 'leaf' : 'container'