Closed pocketjoso closed 8 years ago
Safe Parser goal is try to save origin file as close as possible.
But, you task is interesting too. I think, the best way is to write a PostCSS plugin, which will normalize AST from Safe Parser to way how it will be processed in browser.
What do you think?
Hi there, Penthouse needs a fault tolerant css parser, and I thought postcss-safe-parser might do the job. Basically I want the returned css to be the same as what a browser would give you (because I hand it over to an AST parser that isn't fault tolerant). Is this out of scope for this project, or something you would consider?
I'm still setting up my own tests for error handling required, but as an example:
There are more cases like this obviously, that I can add in if it becomes relevant.
If this is out of scope for this project, if you have any ideas for where I should go to look for a
fault tolerant
css parser please let me know.Cheers