diff --git a/src/lib/css-parse.html b/src/lib/css-parse.html index 332857348e..74e4dd072c 100644 --- a/src/lib/css-parse.html +++ b/src/lib/css-parse.html @@ -60,6 +60,7 @@ if (node.parent) { var ss = node.previous ? node.previous.end : node.parent.start; t = text.substring(ss, node.start-1); + t = t.replace(this._rx.multipleSpaces, ' '); // TODO(sorvell): ad hoc; make selector include only after last ; // helps with mixin syntax t = t.substring(t.lastIndexOf(';')+1); @@ -162,6 +163,7 @@ mixinApply: /@apply[\s]*\([^)]*?\)[\s]*(?:[;\n]|$)?/gim, varApply: /[^;:]*?:[^;]*var[^;]*(?:[;\n]|$)?/gim, keyframesRule: /^@[^\s]*keyframes/, + multipleSpaces: /\s+/g }, VAR_START: '--', diff --git a/test/unit/css-parse.html b/test/unit/css-parse.html index 36172ae7ef..39d6444b08 100644 --- a/test/unit/css-parse.html +++ b/test/unit/css-parse.html @@ -60,6 +60,15 @@ } /* comment */ + +