correctly handle the space before ::pseudo

This commit is contained in:
tophf 2018-08-06 12:42:41 +03:00
parent 35baf6f018
commit a5a713be8a

View File

@ -508,15 +508,11 @@
// sass/less parent reference don't use a space // sass/less parent reference don't use a space
// sass nested pseudo-class don't use a space // sass nested pseudo-class don't use a space
/* Stylus override.
Disabling this block since we don't like the result.
// preserve space before pseudoclasses/pseudoelements, as it means "in any child" // preserve space before pseudoclasses/pseudoelements, as it means "in any child"
if (lookBack(" ") && output[output.length - 1] !== " ") { if (lookBack(" ") && outputPosCol && !/\s$/.test(output[output.length - 1])) {
output.push(" "); output.push(" ");
outputPosCol++; outputPosCol++;
} }
*/
if (peek() === ":") { if (peek() === ":") {
// pseudo-element // pseudo-element