From 37f7f1898f9850d81e5805b0dea76e81b21af0a9 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 25 Dec 2017 15:25:47 +0300 Subject: [PATCH] fixup 1406cae6: ) may belong to the parent, also fix readString --- vendor-overwrites/csslint/csslint-worker.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vendor-overwrites/csslint/csslint-worker.js b/vendor-overwrites/csslint/csslint-worker.js index 6b7deff8..4481deb5 100644 --- a/vendor-overwrites/csslint/csslint-worker.js +++ b/vendor-overwrites/csslint/csslint-worker.js @@ -2665,7 +2665,9 @@ Parser.prototype = function() { const value = []; const endings = []; - let end = /[;!}]/; + // a custom property value may end before these characters + // that belong to the parent declaration, not to the custom property + let end = /[;!})]/; readValue: while (!reader.eof()) { @@ -2684,7 +2686,7 @@ Parser.prototype = function() { case "'": reader.reset(); value.pop(); - value.push(reader.readString()); + value.push(this._tokenStream.readString()); continue; case '{': endings.push(end); @@ -2712,7 +2714,7 @@ Parser.prototype = function() { } end = endings.pop(); if (end) continue; - if (c === '}') { + if (c === '}' || c === ')') { // unget parent } reader.reset(); value.pop();