cmark

My personal build of CMark ✏️

Commit
bdcadff5dfb6f9513b7c109bf1523b6003406c53
Parent
8bcd1ff32b880b3bb51217ba2eed3d204f4cbae8
Author
John MacFarlane <jgm@berkeley.edu>
Date

Removed unnecessary call to cmark_node_unlink in cmark_node_replace.

Diffstat

1 file changed, 1 insertion, 2 deletions

Status File Name N° Changes Insertions Deletions
Modified src/node.c 3 1 2
diff --git a/src/node.c b/src/node.c
@@ -734,8 +734,7 @@ int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode) {
   if (!cmark_node_insert_before(oldnode, newnode)) {
     return 0;
   }
-  cmark_node_unlink(oldnode);
-  cmark_node_free(oldnode);
+  cmark_node_free(oldnode);  // free calls cmark_node_unlink
   return 1;
 }