Fix AST_COMPARE for CSS strings

This commit is contained in:
Simon Lydell committed 2017-08-15 07:58:19 +02:00
1 parent 4979f58c15
commit b286ed171e
1 file changed
+11
+11
View File
@@ -82,6 +82,17 @@ function massageAST(ast) {
newObj.value = newObj.value.toLowerCase();
}
if (
(ast.type === "media-value" ||
ast.type === "selector-attribute" ||
ast.type === "value-string") &&
newObj.value
) {
newObj.value = newObj.value
.replace(/'/g, '"')
.replace(/\\([^a-fA-F\d])/g, "$1");
}
// (TypeScript) Ignore `static` in `constructor(static p) {}`
// and `export` in `constructor(export p) {}`
if (