-
-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError: Unexpected token, expected } for inline CSS block #9
Comments
@fwielstra ah style is not supported, we could easily fix it by adding a h2x transform. Feel free to submit a PR! |
Hmm, looking into this a bit further, it might be better to disallow styles completely; react doesn't do CSS isolation (yet?), so two svg's with a style tag can overwrite each other's styles if they match in name (which for Adobe Illustrator's exporter they do apparently). |
@fwielstra yes probably better to remove them completely. |
It can be easily done by adding a h2x plugin, similar to removeComments, difference will be that we remove a whole tag "style". |
Fixed in v0.5.0 |
I have a logo generated by Adobe Illustrator's SVG export plugin (supplied by our designers). I had transformed it to a React component by hand first, until I found this package. It doesn't seem to handle a style block though; I think the parser tries to interpret it as a react template construction.
Very minimal example, probably not valid SVG but it reproduces the parse error:
Error output:
The text was updated successfully, but these errors were encountered: