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 + "";