mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Keep the greedy built-in class fast path aligned with the regular VM matcher for non-Unicode regexps. Without this, /\w+/i and /\W+/i wrongly applied Unicode ignore-case behavior in the optimized loop.
7 lines
231 B
JavaScript
7 lines
231 B
JavaScript
test("greedy \\w and \\W do not apply unicode ignore-case behavior without /u", () => {
|
||
expect(/\w/i.exec("ſ")).toBeNull();
|
||
expect(/\w+/i.exec("ſ")).toBeNull();
|
||
|
||
expect(/\W+/i.exec("a😀ſZ")[0]).toBe("😀ſ");
|
||
});
|