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

Regular Expression inside Array break syntax highlighting #650

Open
ylazy opened this issue Nov 30, 2022 · 2 comments
Open

Regular Expression inside Array break syntax highlighting #650

ylazy opened this issue Nov 30, 2022 · 2 comments
Labels

Comments

@ylazy
Copy link

ylazy commented Nov 30, 2022

Hi!

All lines below this line will not be syntax highlighted:

private var test:Array = [1, /(')/];

I don't know whether it's an as3mxml issue or VSCode issue.

Interesting, GitHub has the same issue:

private var test:Array = [1, /(')/];
private var foo:String = "bar"; // this line is not syntax highlighted

Workaround: replacing [] with new Array() resolve the problem in VSCode

private var test:Array = new Array(1, /(')/);
@joshtynjala joshtynjala changed the title Regular Expression inside Array break Code Pretty Regular Expression inside Array break syntax highlighting Nov 30, 2022
@joshtynjala
Copy link
Member

In my experience, "pretty printing" usually means "formatting", but it appears that you are referring to "syntax highlighting" or "syntax coloring", so I edited the issue to make that more clear.

@joshtynjala joshtynjala added the bug label Dec 6, 2022
@joshtynjala
Copy link
Member

Confirmed. It seems to be incorrectly detecting the ' character as the start of a string.

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

No branches or pull requests

2 participants