hundredrabbits / Themes

Simple Theme Framework
https://hundredrabbits.github.io/Themes
MIT License
598 stars 76 forks source link

error with benchmark on zxspectrum.svg #39

Closed torcado194 closed 4 years ago

torcado194 commented 4 years ago

the issue is due to the space at the end of the hex of this color https://github.com/hundredrabbits/Themes/blob/2c7becbe4b0defa6a6e80d46ca312fd028f1075d/themes/zxspectrum.svg#L10 which causes color.js to fail on the regex

One simple fix is to change https://github.com/hundredrabbits/Themes/blob/2c7becbe4b0defa6a6e80d46ca312fd028f1075d/editor/scripts/color.js#L4 to this.hex = hex.trim()

though a more robust solution might be to support the full range of css color formats

neauoire commented 4 years ago

I prefer a more strict approach, what I'll do instead is to raise a warning on this theme instead of parsing it.

neauoire commented 4 years ago

Fixed with https://github.com/hundredrabbits/Themes/commit/e90f0c7fb179c19ccee22b01cc8077cdd009c49a