Inwerpsel / use-theme-editor

A React theme editor
GNU General Public License v3.0
4 stars 0 forks source link

Handle invalid syntax while parsing #44

Open Inwerpsel opened 10 months ago

Inwerpsel commented 10 months ago

Currently, the (new but about to be used) parser is written with the assumption that the parsed CSS has no file breaking syntax errors. This is not an unreasonable assumption, as for now it runs against CSS that already went through a development and testing process, and has been published on a live site (or as a public library like Bootstrap). Depending on the eventual use case, this assumption can continue being true.

Nevertheless, it would be nice to explore how much needs to be added to protect against all forms of invalid CSS. Perhaps the same parser could also be used in other places where every parsing error has to be picked up.