1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-26 00:15:06 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins
Linus Groh e46fa3ac8b LibJS: Keep RegExp.exec() results in correct order
By using regex::AllFlags::SkipTrimEmptyMatches we get a null string for
unmatched capture groups, which we then turn into an undefined entry in
the result array instead of putting all matches first and appending
undefined for the remaining number of capture groups - e.g. for

    /foo(ba((r)|(z)))/.exec("foobaz")

we now return

    ["foobaz", "baz", "z", undefined, "z"]

and not [

    ["foobaz", "baz", "z", "z", undefined]

Fixes part of #6042.

Also happens to fix selecting an element by ID using jQuery's $("#foo").
2021-04-03 16:34:34 +02:00
..
Array LibJS: Fix two issues with array (length > INT32_MAX) 2021-03-30 13:52:56 +02:00
ArrayBuffer LibJS: ArrayBuffer.prototype.slice 2021-04-03 16:24:44 +02:00
BigInt LibJS: Throw RangeError on BigInt exponentiation with negative exponent 2021-03-16 21:54:51 +01:00
Boolean Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Date LibJS Date: Added "Invalid Date". 2021-03-22 20:58:22 +01:00
Error Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Function LibJS: Change non-ScriptFunction source string to "[native code]" 2021-03-14 19:22:16 +01:00
functions Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Infinity Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
JSON Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Math LibJS: Improve correctness of rounding and bitwise operations 2021-02-05 09:38:45 +01:00
NaN Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Number Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Object Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Promise LibJS: Add initial support for Promises 2021-04-02 10:47:40 +02:00
Proxy Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Reflect Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
RegExp LibJS: Keep RegExp.exec() results in correct order 2021-04-03 16:34:34 +02:00
String LibJS: Implement most of String.prototype.replace 2021-04-02 10:48:40 +02:00
Symbol Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
TypedArray LibJS: Implement 'Relative Indexing Method' proposal (.at()) 2021-03-12 19:01:08 +01:00