diff --git a/dev/src/ExpressionLexer.js b/dev/src/ExpressionLexer.js index 4e80fef8..0b3ae3c9 100644 --- a/dev/src/ExpressionLexer.js +++ b/dev/src/ExpressionLexer.js @@ -184,12 +184,14 @@ export default class ExpressionLexer { addJSWarnings(token) { if (token.error) { return; } - if ((token.type === "neglookbehind" || token.type === "poslookbehind") || - (token.type === "sticky" || token.type === "unicode" || token.type == "dotall") || - (token.type === "unicodecat" || token.type === "unicodescript") || - (token.type === "namedgroup") - ) { - token.error = {id: "jsfuture", warning:true}; + + // https://caniuse.com/js-regexp-lookbehind + // - lookbehind missing in iOS Safari (16.3) as of 2023-02-16 + if ([ + "neglookbehind", + "poslookbehind" + ].includes(token.type)) { + token.error = { id: "jsfuture", warning: true }; } } @@ -722,4 +724,4 @@ ExpressionLexer.ANCHOR_TYPES = { "wordboundary": true, "notwordboundary": true, "prevmatchend": true -} \ No newline at end of file +}