Skip to content

Commit

Permalink
make links case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Dec 5, 2018
1 parent 25f91e4 commit 7fd544d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/marked.js
Expand Up @@ -615,7 +615,7 @@ inline.gfm = merge({}, inline.normal, {
.getRegex()
});

inline.gfm.url = edit(inline.gfm.url)
inline.gfm.url = edit(inline.gfm.url, 'i')
.replace('email', inline.gfm._extended_email)
.getRegex();
/**
Expand Down
12 changes: 12 additions & 0 deletions test/specs/marked/marked.json
Expand Up @@ -83,6 +83,18 @@
"html": "<p>``<em>test`</em></p>",
"example": 14
},
{
"section": "Autolinks",
"markdown": "HTTP://FOO.COM",
"html": "<p><a href=\"HTTP://FOO.COM\">HTTP://FOO.COM</a></p>",
"example": 15
},
{
"section": "Autolinks",
"markdown": "hTtP://fOo.CoM",
"html": "<p><a href=\"hTtP://fOo.CoM\">hTtP://fOo.CoM</a></p>",
"example": 16
},
{
"section": "Autolinks",
"markdown": "~~hello@email.com~~",
Expand Down

0 comments on commit 7fd544d

Please sign in to comment.