andrewrk / juice

Juice inlines CSS stylesheets into your HTML source.
MIT License
60 stars 13 forks source link

Preserve single quotes for values #8

Closed jrit closed 10 years ago

jrit commented 10 years ago

The previous toString() call being used to generate the styles stripped out all single and double quotes. There is a technical difference between some quoted and non-quoted values, as discussed here http://stackoverflow.com/questions/7638775/do-i-need-to-wrap-quotes-around-font-family-names-in-css

To fix this, the use of toString() is replaced with a very similar bit of code that replace double quotes with single quotes. Because all Juice'd output styles use double quotes, this is reliable.

A test case was added and one test case that had a minor failure from the update, was updated. This should be a non-breaking change.