1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibJS: Enable the BrowserExtended ECMA262 regexp flag by default

Fixes #5517.
This commit is contained in:
AnotherTest 2021-02-27 00:26:45 +03:30 committed by Andreas Kling
parent e0ac85288e
commit 610cec6e72

View file

@ -37,7 +37,9 @@ static Flags options_from(const String& flags, VM& vm, GlobalObject& global_obje
{
bool g = false, i = false, m = false, s = false, u = false, y = false;
Flags options {
{ (regex::ECMAScriptFlags)regex::AllFlags::Global }, // JS regexps are all 'global' by default as per our definition, but the "global" flag enables "stateful".
// JS regexps are all 'global' by default as per our definition, but the "global" flag enables "stateful".
// FIXME: Enable 'BrowserExtended' only if in a browser context.
{ (regex::ECMAScriptFlags)regex::AllFlags::Global | ECMAScriptFlags::BrowserExtended },
{},
};