Skip to content

Commit 9081cec

Browse files
committed
Don't reconsume the % after a percentage token.
1 parent e423808 commit 9081cec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tokenizer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ function tokenize(str, options) {
311311
if(digit(next())) consume() && currtoken.append([0x2e,code]) && switchto('number-fraction');
312312
else emit() && switchto('data') && reconsume();
313313
}
314-
else if(code == 0x25) emit(new PercentageToken(currtoken)) && switchto('data') && reconsume();
314+
else if(code == 0x25) emit(new PercentageToken(currtoken)) && switchto('data');
315315
else if(code == 0x45 || code == 0x65) {
316316
if(!options.scientificNotation) create(new DimensionToken(currtoken,code)) && switchto('dimension');
317317
else if(digit(next())) consume() && currtoken.append([0x25,code]) && switchto('sci-notation');
@@ -337,7 +337,7 @@ function tokenize(str, options) {
337337

338338
if(digit(code)) currtoken.append(code);
339339
else if(code == 0x2e) emit() && switchto('data') && reconsume();
340-
else if(code == 0x25) emit(new PercentageToken(currtoken)) && switchto('data') && reconsume();
340+
else if(code == 0x25) emit(new PercentageToken(currtoken)) && switchto('data');
341341
else if(code == 0x45 || code == 0x65) {
342342
if(!options.scientificNotation) create(new DimensionToken(currtoken,code)) && switchto('dimension');
343343
else if(digit(next())) consume() && currtoken.append([0x25,code]) && switchto('sci-notation');

0 commit comments

Comments
 (0)