fix: do not write to stdout on cssTokenizer parse error (#20012)

Fixes https://github.com/microsoft/playwright/issues/20074
This commit is contained in:
Max Schmitt 2023-01-12 19:10:01 +01:00 committed by GitHub
parent 1430c5b59c
commit 1c1955a6e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,8 +130,8 @@ export function tokenize(str1: string): CSSTokenInterface[] {
};
const donothing = function() { };
const parseerror = function() {
// eslint-disable-next-line no-console
console.log('Parse error at index ' + i + ', processing codepoint 0x' + code.toString(16) + '.'); return true;
// Language bindings don't like writing to stdout!
// console.log('Parse error at index ' + i + ', processing codepoint 0x' + code.toString(16) + '.'); return true;
};
const consumeAToken = function(): CSSTokenInterface {