From 917a1d46affedfbc3b5086814f271975bcb8f1ef Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Wed, 5 Dec 2018 11:29:13 -0600 Subject: [PATCH 1/3] make links case insensitive closes #1350 --- lib/marked.js | 2 +- test/specs/marked/marked.json | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/marked.js b/lib/marked.js index 9e99346462..9298162686 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -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(); /** diff --git a/test/specs/marked/marked.json b/test/specs/marked/marked.json index 1afeea3457..2df2b9e78a 100644 --- a/test/specs/marked/marked.json +++ b/test/specs/marked/marked.json @@ -83,6 +83,18 @@ "html": "

``test`

", "example": 14 }, + { + "section": "Autolinks", + "markdown": "HTTP://FOO.COM", + "html": "

HTTP://FOO.COM

", + "example": 15 + }, + { + "section": "Autolinks", + "markdown": "hTtP://fOo.CoM", + "html": "

hTtP://fOo.CoM

", + "example": 16 + }, { "section": "Autolinks", "markdown": "~~hello@email.com~~", From 5b801d0b996b7eb974005bbd583d0045092ef01a Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 5 Dec 2018 12:12:43 -0600 Subject: [PATCH 2/3] Update example number Co-Authored-By: UziTech --- test/specs/marked/marked.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/marked/marked.json b/test/specs/marked/marked.json index 2df2b9e78a..aae3c105c5 100644 --- a/test/specs/marked/marked.json +++ b/test/specs/marked/marked.json @@ -93,7 +93,7 @@ "section": "Autolinks", "markdown": "hTtP://fOo.CoM", "html": "

hTtP://fOo.CoM

", - "example": 16 + "example": 18 }, { "section": "Autolinks", From ce7a5476cf1ee7b3c44add87c4f0a12cc71969a2 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 5 Dec 2018 12:14:18 -0600 Subject: [PATCH 3/3] Update example number Co-Authored-By: UziTech --- test/specs/marked/marked.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/marked/marked.json b/test/specs/marked/marked.json index aae3c105c5..6a4f0d65f5 100644 --- a/test/specs/marked/marked.json +++ b/test/specs/marked/marked.json @@ -87,7 +87,7 @@ "section": "Autolinks", "markdown": "HTTP://FOO.COM", "html": "

HTTP://FOO.COM

", - "example": 15 + "example": 17 }, { "section": "Autolinks",