From 122e1ee6cd24b5de80a1702313db732c8961202a Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 18 Nov 2019 16:50:40 +0100 Subject: Issue #1284 - Implement /s (dotAll) for regular expressions, v2. Resolves #1284. --- js/src/builtin/RegExp.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'js/src/builtin/RegExp.js') diff --git a/js/src/builtin/RegExp.js b/js/src/builtin/RegExp.js index 0b849292c..1a2276594 100644 --- a/js/src/builtin/RegExp.js +++ b/js/src/builtin/RegExp.js @@ -3,6 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // ES6 draft rev34 (2015/02/20) 21.2.5.3 get RegExp.prototype.flags +// Updated for ES2018 /s (dotAll) function RegExpFlagsGetter() { // Steps 1-2. var R = this; @@ -31,6 +32,10 @@ function RegExpFlagsGetter() { // Steps 16-18. if (R.sticky) result += "y"; + + // ES2018 + if (R.dotall) + result += "s"; // Step 19. return result; -- cgit v1.2.3