From 3f27ec0539dc57edb4b829613cd06cca3ff11616 Mon Sep 17 00:00:00 2001 From: WoLfulus Date: Tue, 5 Aug 2014 07:15:02 -0300 Subject: [PATCH] Windows regex problem fix. --- lib/helpers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/helpers.js b/lib/helpers.js index e532ffd..4c5e192 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -19,7 +19,7 @@ module.exports = function(config){ }, parseJSON: function(str) { - var scopePath = path.join("/", scope) + var scopePath = path.join("/", scope).replace(/\\/g, "/") var rx = RegExp("^" + scopePath, "i") try { @@ -128,11 +128,11 @@ module.exports = function(config){ fullpath = path.join(fullpath, filepath) // add protocol - var fullurl = "https://" + fullpath + var fullurl = "https://" + fullpath.replace(/\\/g, "/") // add querystring if we have one if(obj.hasOwnProperty("query")) fullurl += ("?" + qs.stringify(obj.query)) - + return fullurl }