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!

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 1671527775

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


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

💛 - Coveralls
coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 1671527775

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


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

💛 - Coveralls