Skip to content

Commit

Permalink
Merge pull request #56 from pshihn/path-scientific-parsing
Browse files Browse the repository at this point in the history
removed a faulty regex that was causing scientific notation parsing to fail.
  • Loading branch information
pshihn authored Apr 16, 2018
2 parents 6876ac4 + eb9749d commit f0bd9cb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/rough.js
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ class RoughRenderer {
}

svgPath(path, o) {
path = (path || '').replace(/\n/g, " ").replace(/(-)/g, " -").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
path = (path || '').replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
let p = new RoughPath(path);
if (o.simplification) {
let fitter = new PathFitter(p.linearPoints, p.closed);
Expand Down
2 changes: 1 addition & 1 deletion dist/rough.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rough.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ class RoughRenderer {
}

svgPath(path, o) {
path = (path || '').replace(/\n/g, " ").replace(/(-)/g, " -").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
path = (path || '').replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
let p = new RoughPath(path);
if (o.simplification) {
let fitter = new PathFitter(p.linearPoints, p.closed);
Expand Down
2 changes: 1 addition & 1 deletion dist/rough.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "roughjs",
"version": "2.1.1",
"version": "2.1.2",
"description": "Create graphics using HTML Canvas or SVG with a hand-drawn, sketchy, appearance.",
"main": "dist/rough.umd.js",
"jsnext:main": "src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class RoughRenderer {
}

svgPath(path, o) {
path = (path || '').replace(/\n/g, " ").replace(/(-)/g, " -").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
path = (path || '').replace(/\n/g, " ").replace(/(-\s)/g, "-").replace("/(\s\s)/g", " ");
let p = new RoughPath(path);
if (o.simplification) {
let fitter = new PathFitter(p.linearPoints, p.closed);
Expand Down

0 comments on commit f0bd9cb

Please sign in to comment.