mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-21 15:42:58 +01:00
Answer stability round 1: 0 🔴, 2 🟡 (0 misread); drop tryTaskList's dead child paths and splitTaskList's dead check, and group children in place of a list node
This commit is contained in:
@@ -275,7 +275,7 @@ function reduceTaskList(node: AdfNode, reduction: Reduction): Result<AdfNode[]>
|
||||
const standsAlone = !nestsTasks && !isTaskItem(child) && child.type !== 'taskList'
|
||||
for (const block of standsAlone ? [{ content: blocks, type: 'listItem' }] : blocks) tasks.push(block)
|
||||
}
|
||||
const items = nestsTasks ? taskListItems({ content: tasks, type: 'taskList' }) : undefined
|
||||
const items = nestsTasks ? taskListItems(tasks) : undefined
|
||||
return success(items === undefined ? listOf(tasksAsText(tasks), 'bulletList') : splitTaskList(items))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user