diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-08-30 17:21:18 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-08-30 17:21:18 +0800 |
| commit | efbc2ffe6a1ee5ec38a4396305561d6515d0943e (patch) | |
| tree | 2b4c94f18f2c792dfda813050755d5c0273fae22 /node_modules/postcss-selector-parser/dist/parser.js | |
| parent | 43acceb75957c880a5ba5a31aae221394a36d5f6 (diff) | |
node fixes, updates
Diffstat (limited to 'node_modules/postcss-selector-parser/dist/parser.js')
| -rw-r--r-- | node_modules/postcss-selector-parser/dist/parser.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/node_modules/postcss-selector-parser/dist/parser.js b/node_modules/postcss-selector-parser/dist/parser.js index b4c75e3e..ada61582 100644 --- a/node_modules/postcss-selector-parser/dist/parser.js +++ b/node_modules/postcss-selector-parser/dist/parser.js @@ -116,7 +116,8 @@ var Parser = /*#__PURE__*/function () { line: 1, column: 1 } - } + }, + sourceIndex: 0 }); this.root.append(selector); this.current = selector; @@ -484,7 +485,7 @@ var Parser = /*#__PURE__*/function () { } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); - if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); if (nodes.length > 0) { var last = this.current.last; @@ -577,7 +578,8 @@ var Parser = /*#__PURE__*/function () { var selector = new _selector["default"]({ source: { start: tokenStart(this.tokens[this.position + 1]) - } + }, + sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] }); this.current.parent.append(selector); this.current = selector; @@ -646,8 +648,9 @@ var Parser = /*#__PURE__*/function () { if (last && last.type === types.PSEUDO) { var selector = new _selector["default"]({ source: { - start: tokenStart(this.tokens[this.position - 1]) - } + start: tokenStart(this.tokens[this.position]) + }, + sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] }); var cache = this.current; last.append(selector); |
