grape-web
Advanced tools
Comparing version 0.33.1 to 0.33.2
@@ -14,9 +14,17 @@ 'use strict'; | ||
it('encode parentheses', function () { | ||
var encoded = (0, _utils.encodeMdLink)('something (bad)'); | ||
(0, _expectJs2['default'])(encoded).to.be('something %28bad%29'); | ||
var encoded = (0, _utils.encodeMdLink)('something_(bad)'); | ||
(0, _expectJs2['default'])(encoded).to.be('something_%28bad%29'); | ||
}); | ||
it('encode brackets', function () { | ||
var encoded = (0, _utils.encodeMdLink)('something [bad]'); | ||
(0, _expectJs2['default'])(encoded).to.be('something %5bbad%5d'); | ||
var encoded = (0, _utils.encodeMdLink)('something_[bad]'); | ||
(0, _expectJs2['default'])(encoded).to.be('something_%5bbad%5d'); | ||
}); | ||
it('encode spaces', function () { | ||
var encoded = (0, _utils.encodeMdLink)('string with spaces'); | ||
(0, _expectJs2['default'])(encoded).to.be('string%20with%20spaces'); | ||
}); | ||
it('encode everything', function () { | ||
var encoded = (0, _utils.encodeMdLink)('cg://link with[spaces](etc)'); | ||
(0, _expectJs2['default'])(encoded).to.be('cg://link%20with%5bspaces%5d%28etc%29'); | ||
}); | ||
}); | ||
@@ -23,0 +31,0 @@ |
@@ -27,3 +27,3 @@ 'use strict'; | ||
function encodeMdLink(link) { | ||
var regExp = /[\[\]()]/g; | ||
var regExp = /[\[\]()\s]/g; | ||
return link.replace(regExp, function (c) { | ||
@@ -30,0 +30,0 @@ return '%' + c.charCodeAt(0).toString(16); |
{ | ||
"name": "grape-web", | ||
"version": "0.33.1", | ||
"version": "0.33.2", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "jss": "^3.3.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
124742
1346