Skip to content

Invalid regular expression crash on iOS < 16.4 due to named capturing groups #1760

@pietrangeloalberto

Description

@pietrangeloalberto

Describe the bug
BlockNote (or one of its dependencies) is using modern regular expressions with named capturing groups (e.g. /(?...)/) which are not supported in Safari < 16.4.

This causes a syntax error and blocks rendering or functionality when using the editor on iOS < 16.4.

Example error:

SyntaxError: Invalid regular expression: invalid group specifier name

To Reproduce
Environment
iOS version:
iOS 15.x / iOS 16.2 / iOS 16.3 (Safari)

BlockNote version:
"@blocknote/core": "^0.31.1",
"@blocknote/react": "^0.31.1"

Bundler: Next.js with SWC

Misc

  • Browser: Safari iOS < 16.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions