juice
juice copied to clipboard
Not working for Node 0.11.14
Try this:
var inlineContent = require('juice2').inlineContent;
var result = inlineContent("<!DOCTYPE html><html><body>1</body></html>",
"body { padding: 5px; } ");
console.log(result);
CSS is not inlined.
Just ran in to the same issue. Are the plans to support 0.11 or should we abandon ship?
Btw I switched to Styler until the issue is fixed.
I got the same problem, after debug the code, found out when jsdom
parse the raw html, it'd encountered an error "Cannot set property length of [object Object] which has only a getter".
So I just updated jsdom
to the newest version 3.0.2
, and change a little code, the problem was gone.
My fork here, but i didn't test it much, hope this would be helpful.
@sunnylost thanks a lot! your fork really helped. And it seems to be working fine on 0.11.15 too! :+1:
@sunnylost did you create a pull request?
@OrKoN Not yet.
Take a look at PR andrewrk/swig-email-templates#25, it might help to upgrade jsdom here as well.
@sunnylost a PR would be really appreciated.