From 84ccf9968340ee7a3dd54eef64d2b4c37fbcdfab Mon Sep 17 00:00:00 2001 From: Ayushi Date: Mon, 1 Jul 2019 18:24:00 +0530 Subject: [PATCH 1/2] \u --- test/fixtures/url/default.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/fixtures/url/default.txt b/test/fixtures/url/default.txt index c8b8b9b..e5892e9 100644 --- a/test/fixtures/url/default.txt +++ b/test/fixtures/url/default.txt @@ -12,6 +12,21 @@ http://flowdock.com

http://flowdock.com

. +works with simple urls +. +http://flowdock.com/s +. +

http://flowdock.com/s

+. + + +works with simple urls +. +http://flowdock.com/sssss +. +

http://flowdock.com/sssss

+. + works with text before the url . baz http://flowdock.com From 1ecf61a76737694e9d62dff56a55e88ca6718e3a Mon Sep 17 00:00:00 2001 From: Ayushi Date: Mon, 1 Jul 2019 18:41:20 +0530 Subject: [PATCH 2/2] Adding /u --- package.json | 2 +- src/url.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f04c35d..08b2e7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "markdown-it-flowdock", - "version": "0.3.7", + "version": "0.3.8", "description": "Flowdock hashtag and mention parser for markdown-it", "author": "Ville Lautanala ", "keywords": [ diff --git a/src/url.js b/src/url.js index c2ff0be..625d05a 100644 --- a/src/url.js +++ b/src/url.js @@ -14,7 +14,7 @@ function fixUrlsEndingInAParen(canidate) { } function replaceUrlTextWithAutoLinkUrl(text) { - const urlMatcher = /([a-z-_.:]+:\/\/\S+[^)\W]-?\/?)/ig; + const urlMatcher = /([a-z-_.:]+:\/\/\S+[^)\W]-?\/?)/igu; const firstPass = text.replace(urlMatcher, "<$1>"); return fixUrlsEndingInAParen(firstPass)