3
0
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:
2026-11-09 06:16:12 +01:00
committed by Lillem4n
parent 6b2693d385
commit 256f8f453f
5 changed files with 15 additions and 28 deletions
@@ -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))
}