rough-stuff / rough

Create graphics with a hand-drawn, sketchy, appearance
http://roughjs.com
MIT License
19.73k stars 611 forks source link

Double check the regex in the generator #180

Open pshihn opened 3 years ago

pshihn commented 3 years ago

See the comment here: https://github.com/rough-stuff/rough/pull/174

43081j commented 3 years ago

https://glitch.com/edit/#!/plausible-slime-roof

it doesn't cause any bugs by the looks of it but does mean we can do this, not that anyone would ever want to 👀 (see that the regex isn't a regex so if you put it in the path, it'll get replace in its entirety)

i guess the original intent was just to trim whitespace so:

M       10 10

becomes M 10 10

suggest you change it to replace(/\s+/g, ' ')