summaryrefslogtreecommitdiff
path: root/src/node.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-17 21:35:39 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-17 21:43:47 -0800
commita6c0a1e8b3d2f3456972dad61a435684cac52cb5 (patch)
tree541e7147baf6b053c967bfae05487c250d1ba3db /src/node.c
parent4a7d4e01348660c8deb71bd55231439a4149ab05 (diff)
Make parse_inlines add directly to parent.
Previously parse_inlines returned a list of parsed inlines. This had to be added to the parent, and fix_parents had to be called to manually add the 'parent' links to the children, and the 'last_child' link to the parent. Now parse_inlines takes the parent block as a parameter, and uses cmark_node_append_child to add the children, so that the pointers should be properly managed. This avoids the need for the fix_parents pass.
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index 88c2106..23e8265 100644
--- a/src/node.c
+++ b/src/node.c
@@ -114,6 +114,7 @@ cmark_node_unlink(cmark_node *node) {
node->next = NULL;
node->prev = NULL;
node->parent = NULL;
+
}
int