* Trim whitespace in descendant combinator, fixes #2410 * Permit whitespace changes in clean-ast.jsmaster
parent
86c88ff278
commit
82b80b3c79
|
@ -70,6 +70,10 @@ function massageAST(ast) {
|
|||
delete newObj.params;
|
||||
}
|
||||
|
||||
if (ast.type === "selector-combinator") {
|
||||
newObj.value = newObj.value.replace(/\s+/g, " ");
|
||||
}
|
||||
|
||||
if (ast.type === "media-feature") {
|
||||
newObj.value = newObj.value.replace(/ /g, "");
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ function genericPrint(path, options, print) {
|
|||
: line;
|
||||
return concat([leading, n.value, " "]);
|
||||
}
|
||||
return n.value;
|
||||
return n.value.trim() || line;
|
||||
}
|
||||
case "selector-universal": {
|
||||
return n.value;
|
||||
|
|
|
@ -3,10 +3,34 @@
|
|||
exports[`combinator.css 1`] = `
|
||||
-Option/root .public/section ~ .public/section:before {
|
||||
}
|
||||
|
||||
.x .y {}
|
||||
.x > .y {}
|
||||
.x ~ .y {}
|
||||
.x + .y {}
|
||||
.x.y {}
|
||||
.x .y {}
|
||||
.x
|
||||
.y {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-Option/root .public/section ~ .public/section:before {
|
||||
}
|
||||
|
||||
.x .y {
|
||||
}
|
||||
.x > .y {
|
||||
}
|
||||
.x ~ .y {
|
||||
}
|
||||
.x + .y {
|
||||
}
|
||||
.x.y {
|
||||
}
|
||||
.x .y {
|
||||
}
|
||||
.x .y {
|
||||
}
|
||||
|
||||
`;
|
||||
|
||||
exports[`leading.css 1`] = `
|
||||
|
|
|
@ -1,2 +1,11 @@
|
|||
-Option/root .public/section ~ .public/section:before {
|
||||
}
|
||||
|
||||
.x .y {}
|
||||
.x > .y {}
|
||||
.x ~ .y {}
|
||||
.x + .y {}
|
||||
.x.y {}
|
||||
.x .y {}
|
||||
.x
|
||||
.y {}
|
||||
|
|
|
@ -96,14 +96,26 @@ exports[`selector.css 1`] = `
|
|||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
.powerPathNavigator table.powerPathInfo th:active + th:last-child {
|
||||
}
|
||||
|
||||
/* pressed buttons */
|
||||
.powerPathNavigator .helm button.pressedButton,
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton) {
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.powerPathNavigator .helm button.pressedButton,
|
||||
/* pressed buttons */
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton),
|
||||
.powerPathNavigator
|
||||
.helm
|
||||
button:active:not(.disabledButton),
|
||||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
.powerPathNavigator table.powerPathInfo th:active + th:last-child {
|
||||
}
|
||||
|
||||
/* pressed buttons */
|
||||
.powerPathNavigator .helm button.pressedButton,
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton) {
|
||||
}
|
||||
|
||||
`;
|
||||
|
||||
exports[`trailing_star_slash.css 1`] = `
|
||||
|
|
|
@ -3,3 +3,8 @@
|
|||
.powerPathNavigator table.powerPathInfo th:active,
|
||||
.powerPathNavigator table.powerPathInfo th:active + th:last-child {
|
||||
}
|
||||
|
||||
/* pressed buttons */
|
||||
.powerPathNavigator .helm button.pressedButton,
|
||||
.powerPathNavigator .helm button:active:not(.disabledButton) {
|
||||
}
|
||||
|
|
|
@ -28,8 +28,10 @@ exports[`selectors.css 1`] = `
|
|||
}
|
||||
}
|
||||
|
||||
.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas,
|
||||
.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas .asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas {
|
||||
.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas
|
||||
.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas,
|
||||
.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas
|
||||
.asdasldaskdhjkashdahsdkjahskdjhakjsdkjahsdhkas {
|
||||
}
|
||||
|
||||
`;
|
||||
|
|
Loading…
Reference in New Issue