Nodes missing in generated document (IF command)
marzn opened this issue · comments
Marcel commented
General description
We discovered a bug, which resulted in missing elements we would expect to be in the output. For example the following template generates an empty document:
Used template: node-removal.docx
Debugging results
While debugging I found the reason in processTemplate.ts:252
. In the example above the node containing the text "Should appear in the output" is in the tree below the last sibling, which means it gets removed. The selected node in the screenshot is the last sibling and therefore this node and its children will be removed by L252
.
Possible workaround
A newline before each END-IF