43081j / postcss-lit

PostCSS syntax for extracting CSS from template literals inside JS/TS files
84 stars 6 forks source link

fix: do not mutate non-css strings #25

Closed 43081j closed 2 years ago

43081j commented 2 years ago

Basically, if you have a source file with no CSS, like so:

html`<div></div>`;

it appears postcss will stringify it but have no reference node. in these cases, i think (or hope) we can safely assume we're not stringifying CSS and to just leave it alone.

this was causing backticks in JS to be escaped before.

cc @abdonrd

coveralls commented 2 years ago

Pull Request Test Coverage Report for Build 1671527775


Totals Coverage Status
Change from base Build 1602839425: 0.03%
Covered Lines: 635
Relevant Lines: 643

💛 - Coveralls
abdonrd commented 2 years ago

Yay! Thanks James!