Skip to content

Commit

Permalink
Merge pull request markedjs#1384 from UziTech/url-case-insensitive
Browse files Browse the repository at this point in the history
Make autolinks case insensitive
  • Loading branch information
styfle committed Dec 6, 2018
2 parents 8af264b + c52cf11 commit 71dba84
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 @@ -620,7 +620,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": 17
},
{
"section": "Autolinks",
"markdown": "hTtP://fOo.CoM",
"html": "<p><a href=\"hTtP://fOo.CoM\">hTtP://fOo.CoM</a></p>",
"example": 18
},
{
"section": "Autolinks",
"markdown": "~~hello@email.com~~",
Expand Down

0 comments on commit 71dba84

Please sign in to comment.