cmark

My personal build of CMark ✏️

Commit
71ef02503ebbd82497920ecc7d580c480865c47a
Parent
1f09bfd091eeedbf4ff27e519201ee2c428710c1
Author
Nick Wellnhofer <wellnhofer@aevum.de>
Date

Fix URL check in is_autolink

In a recent commit, the check was changed to strcmp, but we really have to use strncmp.

Diffstat

1 file changed, 1 insertion, 1 deletion

Status File Name N° Changes Insertions Deletions
Modified src/commonmark.c 2 1 1
diff --git a/src/commonmark.c b/src/commonmark.c
@@ -143,7 +143,7 @@ static bool is_autolink(cmark_node *node) {
     return false;
   }
   cmark_consolidate_text_nodes(link_text);
-  if (strcmp((const char *)url, "mailto:") == 0) {
+  if (strncmp((const char *)url, "mailto:", 7) == 0) {
     url += 7;
   }
   return link_text->data != NULL &&