From 09dc30f2befa025d350919de7a0234d398d63f63 Mon Sep 17 00:00:00 2001 From: Cameron Westland Date: Sun, 14 Oct 2012 16:06:33 -0400 Subject: [PATCH] Updated threeComponents regexp to support relative protocols Example: //cdn.optimizely.com/js/122267127.js --- lib/xtnd.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xtnd.coffee b/lib/xtnd.coffee index d7371d8..82a0dbd 100644 --- a/lib/xtnd.coffee +++ b/lib/xtnd.coffee @@ -1,7 +1,7 @@ xtnd = exports _guide = null -_threeComponents = /^(https?):\/\/([^\/]*)(.*)$/ +_threeComponents = /^(https?)?:?\/\/([^\/]*)(.*)$/ _twoComponents = /^\/\/([^\/]*)(.*)$/ listToHash = (str) ->