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] The RegExp d Modifier was not support on Safari 14 const markRegex = /\bMARK:\s*(.*)$/d; #4557

Open
1 of 2 tasks
XueMeijing opened this issue Jun 12, 2024 · 1 comment

Comments

@XueMeijing
Copy link

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

Reproduction Steps

This website https://vscode.dev can't open at Safari 14 either, I can't test if it is Reproducible, so i just describe what the problem is.

I encountered an error on Safari 14 while using "monaco-editor": "^0.48.0". The error message is: Invalid regular expression: invalid flags

The error occurs at the following line of code:

const markRegex = /\bMARK:\s*(.*)$/d;

It appears similar to the issue reported at #2345.

You can find the specific line causing the error in the VSCode repository line 39:
https://github.com/microsoft/vscode/blob/5ae5a741bdb676abb667fd4896dc2a40e313db3a/src/vs/editor/common/services/findSectionHeaders.ts#L39

image

Environment
monaco-editor version: ^0.48.0
Browser: Safari 14

Additional Information
According to the W3Schools documentation, the /d modifier was introduced in ES2022. It seems this modifier is not supported in Safari 14.

Could you provide a workaround or a fix for this issue?

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

No response

@kagaricyan
Copy link

same, I downgrade to 0.47.0 that works fine

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

No branches or pull requests

2 participants