ext/redcarpet/markdown.c in redcarpet-1.15.1 vs ext/redcarpet/markdown.c in redcarpet-1.15.2
- old
+ new
@@ -876,11 +876,11 @@
char c = data[-rewind - 1];
if (isalnum(c))
continue;
- if (strchr(".!#$%&*+-/=?^_`|~", c) != NULL)
+ if (strchr(".+-_", c) != NULL)
continue;
break;
}
@@ -893,10 +893,10 @@
if (isalnum(c))
continue;
if (c == '@')
nb++;
- else if (c == '.')
+ else if (c == '.' && link_end < size - 1)
np++;
else if (c != '-' && c != '_')
break;
}