Closed 43081j closed 6 months ago
We already account for escape sequences added to the AST later on (i.e. something like stylelint, postcss, etc has mutated it).
However, we do not unescape sequences on the way into the parser.
For example:
css` .foo { content: "\\abc"; } `;
This is already escaped, once for JS, once for the resulting CSS.
When we parse this, we extract the CSS and keep the double-escape. This of course means the resulting CSS file internally has one too many escapes.
Fixes #51 To account for this, we now unescape CSS on the way in (i.e. replace double escapes with single).
We already account for escape sequences added to the AST later on (i.e. something like stylelint, postcss, etc has mutated it).
However, we do not unescape sequences on the way into the parser.
For example:
This is already escaped, once for JS, once for the resulting CSS.
When we parse this, we extract the CSS and keep the double-escape. This of course means the resulting CSS file internally has one too many escapes.
Fixes #51 To account for this, we now unescape CSS on the way in (i.e. replace double escapes with single).