mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00:00
LibJS: Trim non-ASCII whitespace as well in StringToBigInt
This was never caught since the original implementation AFAICT, and isn't being covered by test262 either: https://github.com/tc39/test262/issues/1354
This commit is contained in:
parent
c88c33dc22
commit
15e3a99250
1 changed files with 1 additions and 1 deletions
|
@ -675,7 +675,7 @@ Optional<BigInt*> Value::string_to_bigint(VM& vm) const
|
|||
VERIFY(is_string());
|
||||
|
||||
// 1. Let text be StringToCodePoints(str).
|
||||
auto text = as_string().string().view().trim_whitespace();
|
||||
auto text = Utf8View(as_string().string().view()).trim(whitespace_characters, AK::TrimMode::Both).as_string();
|
||||
|
||||
// 2. Let literal be ParseText(text, StringIntegerLiteral).
|
||||
auto result = parse_bigint_text(text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue