From e84dd4c5b918926479c48c2ac5eae10f832e22c4 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Fri, 20 Dec 2013 13:32:46 +0100 Subject: [PATCH] fixed link parsing --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2f8b574..0a5f41c 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ var INDENT = ' '; var type = function(doc) { if (doc === null) return 'null'; if (Array.isArray(doc)) return 'array'; - if (typeof doc === 'string' && /https?:/.test(doc)) return 'link'; + if (typeof doc === 'string' && /^https?:/.test(doc)) return 'link'; return typeof doc; };