This commit is contained in:
2026-08-14 16:03:47 +01:00
parent fd53e3f4fb
commit dfdc3b2840
2463 changed files with 186456 additions and 111315 deletions
+4
View File
@@ -36,6 +36,7 @@ module.exports = function tokenizer(input, options = {}) {
let pos = 0
let buffer = []
let returned = []
let lastBadParen = -1
function position() {
return pos
@@ -127,11 +128,14 @@ module.exports = function tokenizer(input, options = {}) {
currentToken = ['brackets', css.slice(pos, next + 1), pos, next]
pos = next
} else if (pos <= lastBadParen) {
currentToken = ['(', '(', pos]
} else {
next = css.indexOf(')', pos + 1)
content = css.slice(pos, next + 1)
if (next === -1 || RE_BAD_BRACKET.test(content)) {
lastBadParen = next === -1 ? length : next
currentToken = ['(', '(', pos]
} else {
currentToken = ['brackets', content, pos, next]