ext/markdown/autolink.c in github-markdown-0.5.4 vs ext/markdown/autolink.c in github-markdown-0.5.5

- old
+ new

@@ -202,24 +202,27 @@ size_t max_rewind, size_t size, unsigned int flags) { size_t link_end, rewind; - int nb = 0, np = 0; + int nb = 0, np = 0, ns = 0; for (rewind = 0; rewind < max_rewind; ++rewind) { uint8_t c = data[-rewind - 1]; if (isalnum(c)) continue; if (strchr(".+-_", c) != NULL) continue; + if (c == '/') + ns++; + break; } - if (rewind == 0) + if (rewind == 0 || ns > 0) return 0; for (link_end = 0; link_end < size; ++link_end) { uint8_t c = data[link_end];