From f36203202591f5b7466d2824737c40a820710a44 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Sat, 23 Mar 2013 16:38:29 -0400 Subject: [PATCH] Fixed path parsing bug The path parser didn't handle numbers like "1e-4" correctly. (I don't know what the SVG standard has to say about that formatting, but Inkscape certainly does output them like that.) --- lib/path.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/path.coffee b/lib/path.coffee index 09da459..3fb7437 100644 --- a/lib/path.coffee +++ b/lib/path.coffee @@ -45,7 +45,7 @@ class SVGPath cmd = c - else if c in [" ", ","] or (c is "-" and curArg.length > 0) or (c is "." and foundDecimal) + else if c in [" ", ","] or (c is "-" and curArg.length > 0 and curArg[curArg.length-1]!='e') or (c is "." and foundDecimal) continue if curArg.length is 0 if args.length is params # handle reused commands