Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Invalid regular expression: invalid group specifier name (introduced in 2.10.3) #5889

Open
1 task done
erwamartin opened this issue Nov 29, 2024 · 9 comments
Open
1 task done
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Info: Help Wanted The issue or pullrequest needs help from the community Type: Bug The issue or pullrequest is related to a bug

Comments

@erwamartin
Copy link

Affected Packages

extension-code

Version(s)

2.10.3

Bug Description

The TipTap code extension fails to load on Safari versions below 16 due to the following error:

Invalid regular expression: invalid group specifier name.

This issue prevents the file from being loaded and stems from an incompatible regex introduced in this commit:
ueberdosis/tiptap commit f79c05e.

The regex uses named capturing groups and lookbehind assertions, which are not supported in Safari versions earlier than 16.

Browser Used

Safari

Code Example URL

No response

Expected Behavior

The file should load correctly.

Rewritten Regex
Original:

export const inputRegex = /(?<!`)`([^`]+)`(?!`)/;
export const pasteRegex = /(?<!`)`([^`]+)`(?!`)/g;

Rewritten Without Lookbehind:

export const inputRegex = /(^|[^`])`([^`]+)`(?!`)/;
export const pasteRegex = /(^|[^`])`([^`]+)`(?!`)/g;

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@erwamartin erwamartin added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Nov 29, 2024
@wallisonfelipe
Copy link

Same here:
Invalid regular expression: invalid group specifier name

@nperez0111
Copy link
Contributor

Would happily accept a PR to address this

@nperez0111 nperez0111 added the Info: Help Wanted The issue or pullrequest needs help from the community label Dec 4, 2024
@lino-levan
Copy link
Contributor

lino-levan commented Dec 6, 2024

This issue was fixed in #5916. I guess we're waiting on that to be released.

@nperez0111
Copy link
Contributor

nperez0111 commented Dec 7, 2024

Yes, we queue releases. If you need it now, you can use the PR's version: #5916 (comment)

@lino-levan
Copy link
Contributor

Any timeline on when the next version of tiptap will be released?

@nperez0111
Copy link
Contributor

No, we release when we feel ready. Please refer to my previous comment above

If you need it now, you can use the PR's version

@ccreusat
Copy link

Hi guys !

For your information, we have the same problem with Tiptap and the code extension in version 2.3.0 in Safari 15.6 and below (but that's ok I think). Works in Safari 16.5, 17.6, ... 👍🏼

@Nantris
Copy link
Contributor

Nantris commented Dec 19, 2024

Whoops I see I've duplicated this issue in #5948.

I've closed it as a duplicated, but I've suggested a more robust approach there that brings the best of both worlds.

@Nantris
Copy link
Contributor

Nantris commented Dec 19, 2024

I think this was already released though and issues persist? So now I'm not sure I've really duplicated the issue. Anyway, sorry, that's enough cluttering your inboxes. Looking forward to a resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Info: Help Wanted The issue or pullrequest needs help from the community Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

6 participants