Fix parsing complex style props #172
Conversation
|
hey @danielberndt, thanks for this. I'll likely get to reviewing/merging early this week. Are you planning on maintaining htmltojsx going forward or should we look at incorporating the new code in the repo here instead? |
|
No, I don't think I can guarantee maintaining this fork. So I'd consider this to be a temporary fix only. So I think that somehow incorporating that piece would be a smarter move. And I guess that using something like rehype might make it fairly straight forward. In my research I also found this file from the |
|
merging this since it can't really make the html/jsx situation worse, but we really need a better solution to this problem of gatsby plugins inserting raw html that needs to be converted to JSX. (note: it doesn't look like the other PRs for htmltojsx are anywhere near being merged, etc) Thanks for the PR @danielberndt |
|
meh, looks like this is causing warnings in the console. going to investigate trying to run https://www.npmjs.com/package/@mapbox/hast-util-to-jsx in a loop on html fragments |
Use fork of html-to-jsx

the version of
htmltojsxthat is being used has an issue with the style prop that is being output bygatsby-remark-images:It struggles with the semicolon within the
url()part.Since there haven't been any releases of
htmltojsxin a long time, I'm not too certain my PR will be merged and released anytime soon. So I published a fork which fixes the issue.This PR basically replaces the old
htmltojsxwith my fork.