From 9fe3b46ddb58ebcd2a94e59e5687fd439d0ead32 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Tue, 18 Nov 2014 00:43:51 +0100 Subject: Store link labels as children in tree structure --- src/node.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/node.c') diff --git a/src/node.c b/src/node.c index ed58e90..88c2106 100644 --- a/src/node.c +++ b/src/node.c @@ -75,7 +75,6 @@ S_can_contain(cmark_node *node, cmark_node *child) case CMARK_NODE_STRONG: case CMARK_NODE_LINK: case CMARK_NODE_IMAGE: - case CMARK_NODE_LINK_LABEL: return S_is_inline(child); default: @@ -233,22 +232,6 @@ cmark_node_append_child(cmark_node *node, cmark_node *child) return 1; } -// Utility function used by cmark_free_nodes -static void splice_into_list(cmark_node* e, cmark_node* children) { - cmark_node * tmp; - if (children) { - tmp = children; - // Find last child - while (tmp->next) { - tmp = tmp->next; - } - // Splice children into list - tmp->next = e->next; - e->next = children; - } - return ; -} - int cmark_node_check(cmark_node *node) { cmark_node *cur = node; @@ -326,7 +309,6 @@ void cmark_free_nodes(cmark_node *e) case NODE_IMAGE: free(e->as.link.url); free(e->as.link.title); - splice_into_list(e, e->as.link.label); break; default: break; -- cgit v1.2.3