From 3f017892e0e22a61da00547b5ab29f1a1fd4deb6 Mon Sep 17 00:00:00 2001 From: Drew Regitsky Date: Thu, 10 Mar 2016 18:41:01 -0800 Subject: [PATCH] fix(regexp-utils): Fix urlLinkTagRegex bug Regex was missing a `?`, so consumed all tags on a single line. Fixed to be non-greedy. --- src/regexp-utils.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regexp-utils.coffee b/src/regexp-utils.coffee index dd9c047dd..afff6fd28 100644 --- a/src/regexp-utils.coffee +++ b/src/regexp-utils.coffee @@ -51,7 +51,7 @@ RegExpUtils = # 3. the rest of the opening a tag # 4. the contents of the a tag # 5. the closing tag - urlLinkTagRegex: -> new RegExp(/()([\s\S]*?)(<\/a>)/gim) + urlLinkTagRegex: -> new RegExp(/()([\s\S]*?)(<\/a>)/gim) # https://regex101.com/r/zG7aW4/3 imageTagRegex: -> /]*src="([^"]*)"[^>]*>/g