From f0f19aae4d3a0c5027707805676f82ef8530ed75 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 27 Jan 2016 08:08:42 -0500 Subject: [PATCH] dealing with https --- index.js | 2 +- tests/basic.txt | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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