From a6c0a1e8b3d2f3456972dad61a435684cac52cb5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 17 Nov 2014 21:35:39 -0800 Subject: 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. --- src/inlines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inlines.h') diff --git a/src/inlines.h b/src/inlines.h index 422b8e3..92b3b7a 100644 --- a/src/inlines.h +++ b/src/inlines.h @@ -8,7 +8,7 @@ extern "C" { unsigned char *cmark_clean_url(cmark_chunk *url); unsigned char *cmark_clean_title(cmark_chunk *title); -cmark_node* cmark_parse_inlines(cmark_strbuf *input, cmark_reference_map *refmap); +void cmark_parse_inlines(cmark_node* parent, cmark_reference_map *refmap); int cmark_parse_reference_inline(cmark_strbuf *input, cmark_reference_map *refmap); -- cgit v1.2.3