avancement planning
This commit is contained in:
+4
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user