Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 990058dd93878188d65e53e02eda4b64feb69c1d
https://github.com/WebKit/WebKit/commit/990058dd93878188d65e53e02eda4b64feb69c1d
Author: Devin Rousso <[email protected]>
Date: 2024-04-21 (Sun, 21 Apr 2024)
Changed paths:
A JSTests/stress/regexp-escape.js
M Source/JavaScriptCore/runtime/OptionsList.h
M Source/JavaScriptCore/runtime/RegExpConstructor.cpp
Log Message:
-----------
[JSC] add support for `RegExp.escape`
https://bugs.webkit.org/show_bug.cgi?id=272622
Reviewed by Justin Michaud and Ross Kirsling.
This will help developers construct regular expressions that contain special
characters without having to manually escape/replace them (e.g. URLs often
contain a `.` so making a regular expression to match would require that all of
them be replaced with `\.` instead).
Spec: <https://tc39.es/proposal-regex-escaping/>
Proposal: <https://github.com/tc39/proposal-regex-escaping>
* Source/JavaScriptCore/runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::finishCreation):
(JSC::regExpConstructorEscape): Added.
* Source/JavaScriptCore/runtime/OptionsList.h:
Add a feature flag for this.
* JSTests/stress/regexp-escape.js: Added.
Canonical link: https://commits.webkit.org/277793@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes