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

syntax highlighting bug #65

Open
versionbayjc opened this issue May 11, 2023 · 3 comments
Open

syntax highlighting bug #65

versionbayjc opened this issue May 11, 2023 · 3 comments
Labels

Comments

@versionbayjc
Copy link

versionbayjc commented May 11, 2023

The following (I agree strange) code example, does not look like it is highlighted properly in VS Code with the MATLAB plugin. The Editor in MATLAB does show the highlighting correctly:

a = struct("Bla"', "bla"');

edit: adding more version details:
VS Code 1.78.1 on Windows 10 22H2
Extension version: v1.0.2
Configured MATLAB in the Extension settings: R2023a Update 1

@hamidingit
Copy link
Member

I am not able to reproduce this in my environment:
image

my environment:
VS Code: 1.78.1 on windows
extension version: 1.0.2
MATLAB: 2021b

@versionbayjc
Copy link
Author

versionbayjc commented May 12, 2023

That is also what I see and I think is wrong. This is what the MATLAB editor shows:
image

Just to make sure: this syntax is valid and I would expect proper parenthesis matching and string highlighting. The first "bla" shows up with different colored first and last ", it's as if the single quotes and double quotes are not properly matched. The single quotes in this example are a transpose operation, not a delimiter for a char array.

@dklilley
Copy link
Member

Thanks for reporting this! You are correct - this is being highlighted incorrectly, and the single quotes should instead be interpreted as transpose characters, as you stated.

@dklilley dklilley added the bug label May 12, 2023
@dklilley dklilley transferred this issue from mathworks/MATLAB-extension-for-vscode Sep 5, 2023
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

3 participants