diff options
-rw-r--r-- | src/inlines.c | 1 | ||||
-rw-r--r-- | src/node.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/inlines.c b/src/inlines.c index e08b757..5a8024d 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -431,6 +431,7 @@ static void process_emphasis(subject *subj, delimiter_stack *stack_bottom) // fix tree structure tmp = emph->first_child; + tmp->prev = NULL; while (tmp->next != NULL && tmp->next != closer->first_inline) { tmp->parent = emph; tmp = tmp->next; @@ -607,6 +607,11 @@ cmark_node_check(cmark_node *node, FILE *out) cur = node; while (true) { if (cur->first_child) { + if (cur->first_child->prev != NULL) { + S_print_error(out, cur->first_child, "prev"); + cur->first_child->prev = NULL; + ++errors; + } if (cur->first_child->parent != cur) { S_print_error(out, cur->first_child, "parent"); cur->first_child->parent = cur; |