fix: characters escaping (#4472)

This commit is contained in:
Evilebot Tnawi authored and GitHub committed 2018-05-14 13:47:46 +03:00
1 parent dc68a3d9a6
commit 6cd6ea383e
6 files changed
+221 -3

No files matched your search

+10 -3
View File
@@ -410,9 +410,6 @@ function genericPrint(path, options, print) {
const iNextNode = node.groups[i + 1];
const iNextNextNode = node.groups[i + 2];
if (isPostcssSimpleVar(iNode, iNextNode)) {
continue;
}
// Ignore after latest node (i.e. before semicolon)
if (!iNextNode) {
continue;
@@ -433,6 +430,16 @@ function genericPrint(path, options, print) {
continue;
}
// Ignore `\` (i.e. `$variable: \@small;`)
if (iNode.value === "\\") {
continue;
}
// Ignore `$$` (i.e. `background-color: $$(style)Color;`)
if (isPostcssSimpleVar(iNode, iNextNode)) {
continue;
}
if (
(iPrevNode &&
iPrevNode.type === "value-comment" &&