can-route
Advanced tools
Comparing version 3.0.3 to 3.0.4
@@ -33,3 +33,3 @@ /*jshint -W079 */ | ||
// Any word character or a period is matched. | ||
var curliesMatcher = /\{([\w.]+)\}/g; | ||
var curliesMatcher = /\{\s*([\w.]+)\s*\}/g; | ||
var colonMatcher = /\:([\w.]+)/g; | ||
@@ -36,0 +36,0 @@ // Regular expression for identifying &key=value lists. |
{ | ||
"name": "can-route", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
@@ -1064,1 +1064,33 @@ /* jshint asi:true */ | ||
} | ||
test("param with whitespace in interpolated string (#45)", function () { | ||
canRoute.routes = {}; | ||
canRoute("{ page }", { | ||
page: "index" | ||
}) | ||
var res = canRoute.param({ | ||
page: "index" | ||
}); | ||
equal(res, "") | ||
canRoute("pages/{ p1 }/{ p2 }/{ p3 }", { | ||
p1: "index", | ||
p2: "foo", | ||
p3: "bar" | ||
}) | ||
res = canRoute.param({ | ||
p1: "index", | ||
p2: "foo", | ||
p3: "bar" | ||
}); | ||
equal(res, "pages///") | ||
res = canRoute.param({ | ||
p1: "index", | ||
p2: "baz", | ||
p3: "bar" | ||
}); | ||
equal(res, "pages//baz/") | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96837
2728