Skip to content

Commit

Permalink
Merge pull request #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 authored Dec 6, 2018
2 parents 20d3b8c + ce7a547 commit 06297df
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 06297df

Please sign in to comment.