Ignore malformed style attributes in minifyStyles.
If a style attribute contains malformed styles, csso.minifyBlock() may throw an exception. This PR changes the code to catch the exception and leave the style value unchanged.
Resolves #1863.
Maybe add an option to remove malformed style? Users may want to have garbage styles removed. But it's not clear if the styles wrong or just some new feature not recognized by SVGO, so it should be optional.
hi, any update for this PR ?
I've pretty much given up on any bugs ever getting fixed in SVGO. I've been working on a spinoff of SVGO 4 which prioritizes lossless compression - https://www.npmjs.com/package/svgo-ll - that version handles the file in issue #1863.
svgo-ll discards the malformed property name since it's not valid. If you edit the input file to correct the property name, the property is retained, but it doesn't affect how the file is rendered.