From 56e8dae906885dbaf514c20b252bc1b89b2e513c Mon Sep 17 00:00:00 2001 From: Chris Hager Date: Mon, 21 Feb 2011 13:02:26 -0500 Subject: [PATCH] fixed link showdown: http://... should not be escaped, only with --- showdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showdown.js b/showdown.js index f5504d6c..fd16a3c0 100644 --- a/showdown.js +++ b/showdown.js @@ -150,7 +150,7 @@ this.makeHtml = function(text) { text = text.replace(/~T/g,"~"); // ** GFM ** Auto-link URLs and emails - text = text.replace(/https?\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!]/g, function(wholeMatch, issue, matchIndex){ + text = text.replace(/]*[^.,;'">\:\s\<\>\)\]\!]/g, function(wholeMatch, issue, matchIndex){ var left = text.slice(0, matchIndex), right = text.slice(matchIndex); if (left.match(/<[^>]+$/) && right.match(/^[^>]*>/)) {return wholeMatch;} return "" + wholeMatch + "";