summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2020-01-25 10:55:05 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2020-01-25 09:39:32 -0800
commit71ef02503ebbd82497920ecc7d580c480865c47a (patch)
treefc49f62097a8af942fcdbe94009a6a3e925b4be4 /src
parent1f09bfd091eeedbf4ff27e519201ee2c428710c1 (diff)
Fix URL check in is_autolink
In a recent commit, the check was changed to strcmp, but we really have to use strncmp.
Diffstat (limited to 'src')
-rw-r--r--src/commonmark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commonmark.c b/src/commonmark.c
index cb926c5..497040a 100644
--- 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 &&