diff --git a/index.js b/index.js index 76c924a..6b5613e 100755 --- a/index.js +++ b/index.js @@ -55,7 +55,7 @@ module.exports = function(input){ } } html += popHTMLStack(-1, previous_line_num_tabs); - html = html.replace(/(http:\/\/[^\s<]*)/g, '$1'); + html = html.replace(/(https?:\/\/[^\s<]*)/g, '$1'); previous_line_num_tabs = -1; return html } diff --git a/tests/basic.txt b/tests/basic.txt index 937fb05..a7be19e 100644 --- a/tests/basic.txt +++ b/tests/basic.txt @@ -1 +1,4 @@ -http://www.google.com +this is a list + go to this guy: http://www.google.com + +this is a link in a paragraph with https: https://www.google.com