Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: unescape backslashes on the way into the parser (#52)
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: ```ts 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. To account for this, we now unescape CSS on the way in (i.e. replace double escapes with single).
- Loading branch information