From 3d0b733e9af385bc38fa51dceb327225ced634ca Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 15 Oct 2020 14:36:15 +0300 Subject: [PATCH] parserlib: skip spaces before "," in @document foo() , bar() --- vendor-overwrites/csslint/parserlib.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/vendor-overwrites/csslint/parserlib.js b/vendor-overwrites/csslint/parserlib.js index 7d126f8f..7ab9b454 100644 --- a/vendor-overwrites/csslint/parserlib.js +++ b/vendor-overwrites/csslint/parserlib.js @@ -4326,13 +4326,8 @@ self.parserlib = (() => { _document() { const stream = this._tokenStream; const functions = []; - let prefix = ''; - const start = stream.mustMatch(Tokens.DOCUMENT_SYM); - if (/^@-([^-]+)-/.test(start.value)) { - prefix = RegExp.$1; - } - + const prefix = start.value.split('-')[1] || ''; do { this._ws(); functions.push(this._documentFunction()); @@ -4373,9 +4368,12 @@ self.parserlib = (() => { _documentFunction() { const stream = this._tokenStream; - return stream.match(Tokens.URI) ? - new PropertyValuePart(stream._token) : - this._function(); + if (stream.match(Tokens.URI)) { + const res = new PropertyValuePart(stream._token); + this._ws(); + return res; + } + return this._function(); } _operator(inFunction) {