aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordotnetCarpenter <jon.ronnenberg@gmail.com>2016-10-20 16:56:24 -0200
committerdotnetCarpenter <jon.ronnenberg@gmail.com>2016-10-20 17:45:17 -0200
commit288662d0d9152602756b82f20798df9f47329bca (patch)
tree1cd07b9b6ae22196d7a524c8bb81221550333b7f
parent695f26a8df5907f3f49b208eb757ef85b0cd2cfa (diff)
downloadsvg.js-288662d0d9152602756b82f20798df9f47329bca.tar.gz
svg.js-288662d0d9152602756b82f20798df9f47329bca.zip
fix leading/trailing space test case
odd number of points is invalid in SVG See https://svgwg.org/svg2-draft/shapes.html#DataTypePoints
-rw-r--r--dist/svg.js2
-rw-r--r--spec/spec/array.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/dist/svg.js b/dist/svg.js
index 9abd09e..864b072 100644
--- a/dist/svg.js
+++ b/dist/svg.js
@@ -6,7 +6,7 @@
* @copyright Wout Fierens <wout@woutfierens.com>
* @license MIT
*
-* BUILT: Thu Oct 20 2016 16:47:32 GMT-0200 (WGST)
+* BUILT: Thu Oct 20 2016 16:53:19 GMT-0200 (WGST)
*/;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
diff --git a/spec/spec/array.js b/spec/spec/array.js
index 5b951a9..1671ce8 100644
--- a/spec/spec/array.js
+++ b/spec/spec/array.js
@@ -43,10 +43,10 @@ describe('PointArray', function () {
expect(array + '').toBe('2176.6,1708.8 2176.4,1755.8 2245.8,1801.5 2297,1787.8')
})
- it('parses points with space delimitered x/y coordinates', function() {
- var array = new SVG.PointArray(' 1 2 3 ')
+ it('parses points with space delimitered x/y coordinates - even with leading or trailing space', function() {
+ var array = new SVG.PointArray(' 1 2 3 4 ')
- expect(array + '').toBe('1,2,3')
+ expect(array + '').toBe('1,2,3,4')
})
})