File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -468,7 +468,6 @@ static void process_footnotes(cmark_parser *parser) {
468
468
while ((ev_type = cmark_iter_next (iter )) != CMARK_EVENT_DONE ) {
469
469
cur = cmark_iter_get_node (iter );
470
470
if (ev_type == CMARK_EVENT_EXIT && cur -> type == CMARK_NODE_FOOTNOTE_DEFINITION ) {
471
- cmark_node_unlink (cur );
472
471
cmark_footnote_create (map , cur );
473
472
}
474
473
}
@@ -515,8 +514,10 @@ static void process_footnotes(cmark_parser *parser) {
515
514
qsort (map -> sorted , map -> size , sizeof (cmark_map_entry * ), sort_footnote_by_ix );
516
515
for (unsigned int i = 0 ; i < map -> size ; ++ i ) {
517
516
cmark_footnote * footnote = (cmark_footnote * )map -> sorted [i ];
518
- if (!footnote -> ix )
517
+ if (!footnote -> ix ) {
518
+ cmark_node_unlink (footnote -> node );
519
519
continue ;
520
+ }
520
521
cmark_node_append_child (parser -> root , footnote -> node );
521
522
footnote -> node = NULL ;
522
523
}
You can’t perform that action at this time.
0 commit comments