Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented Jan 2, 2021

Synchronizes with latest from Apple's upstream swift-cmark, which notably includes a change that may resolve the failing test case in #22:

SwiftDocOrg/swift-cmark@1168665#diff-8a84f48458df6eb6274fc1f0eb3c58d7c8e295ed0873323f99b9567202acc392L146-L149

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 strcmp((const char *)url, (char *)link_text->data) == 0;
+  return link_text->data != NULL &&
+         strcmp((const char *)url, (char *)link_text->data) == 0;
 }

@mattt mattt merged commit b9674e6 into master Jan 2, 2021
@mattt mattt deleted the cmark-0_29_0 branch January 2, 2021 13:37
@mattt mattt mentioned this pull request Jan 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants