-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
YAML highlighter crashes in Safari #927
Comments
I also verified your repro link and the grammar playground with YAML work for me in Chrome. I don't have access to a Mac/Safari for testing. Are you able to identify the specific regex that is throwing this error?
It would be helpful to verify that the problem also exists in older (but recent) versions of Safari, and that this wasn't a weird regression in v18.3. |
I think you can get a Windows build of WebKit following this, and surely with Playwright (for both Linux/Windows). Are you able to identify the specific regex that is throwing this error? Sure - all of these seem to fail: Pasting these three into regex101.com shows that the first and last indeed have this error. I'm not sure why Safari threw an error on the second one.
The repro is after we've had this happen in production, so luckily I have some stats from Sentry to report back - I see these versions: 18.2, 18.3, 18.1.1, 18.1, 17.6. I've also simplified the repro - removed React and other stuff, just a plain JS file basically, running the same code, with You can see this repro (which includes sourcemaps) deployed here, for easier debugging maybe. P.S. |
Validations
Describe the bug
When using Safari (I tried on v18.3, but I'm pretty sure it also happens on all other versions), even a simple YAML fails to highlight.
When calling
codeToHtml
you get this error:Other browsers work fine (tested Chromium and Firefox).
Reproduction
https://stackblitz.com/edit/sb1-82zdjs3y?file=src%2FApp.tsx
The text was updated successfully, but these errors were encountered: