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

Answer prose round 1: the README drops the parse-path sentence and the comments say what stands in and why

This commit is contained in:
2026-10-11 12:01:26 +02:00
committed by Lillem4n
parent be3ac4af22
commit cc40fb95f2
5 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export function splitTaskList(list: AdfNode): AdfNode[] {
return blocks
}
// Where `node`, a child of one of the list's tasks, stands among the blocks splitTaskList returns; a lone paragraph, holding its inline node, stands as its taskItem.
// Where `node`, a child of one of the list's tasks, stands among the blocks splitTaskList returns; a task's lone paragraph becomes a taskItem, found by the paragraph's first inline node.
export function splitPlace(list: AdfNode, node: AdfNode & { content: [AdfNode] }): [number, ...ConvertErrorPath] | undefined {
const [inline] = node.content
const places = splitTaskList(list).flatMap((block, index): [number, ...ConvertErrorPath][] => {