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

Safari and negative look-behinds #18

Closed
hildjj opened this issue Mar 6, 2023 · 2 comments · Fixed by #21
Closed

Safari and negative look-behinds #18

hildjj opened this issue Mar 6, 2023 · 2 comments · Fixed by #21

Comments

@hildjj
Copy link
Owner

hildjj commented Mar 6, 2023

Safari doesn't support negative look-behind assertions of the form (?<!y)x. That's pretty awful.

It makes this line fail to parse:

const strEscapeSequencesRegExp = /[\x00-\x1f\x27\x5c\x7f-\x9f]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/;

which makes the global variable util not available.

See peggyjs/peggy#371

@hildjj
Copy link
Owner Author

hildjj commented Mar 6, 2023

This will be fixed in Safari 16.4. I wonder if Peggy can work around it until then.

@hildjj
Copy link
Owner Author

hildjj commented Mar 16, 2023

I decided to just go ahead and fix this, even though the fix was u-g-l-y.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant