-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Lexical version:
Steps To Reproduce
- Use Safari v15, or iOS < 16.4
- Visit a site that uses Lexical with Markdown, e.g., https://playground.lexical.dev/
- Observe that the site fails to load due to an exception
SyntaxError: Invalid regular expression: invalid group specifier name
Link to code example:
| `(?<![\\\\\`])(\`)((?:\\\\\`|[^\`])+?)(\`)(?!\`)`, |
In this file you can see the Regex that have the look behind expression that is causing the issue.
The current behavior
Lexical/the app crashes
The expected behavior
No crashes
Impact of fix
This breaks Lexical on affected browsers. caniuse indicates that Safari <16.4 (March 2023) is affected in particular.