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] Incorrect Syntax Highlighting for 'End Sub' and 'Sub' in VB.NET Code #4783

Open
2 tasks
wmserver opened this issue Dec 13, 2024 · 0 comments
Open
2 tasks

Comments

@wmserver
Copy link

wmserver commented Dec 13, 2024

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

Reproduction Steps

No response

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

Bug Report: Incorrect Syntax Highlighting for VB.NET in Monaco Editor
Description
When using Monaco Editor to highlight VB.NET code, the syntax highlighting renders incorrectly under certain conditions. Specifically, when the following VB.NET code is entered:

Public Class Form1
Private Sub abc()
End Sub
End Class

The End Sub and Sub keywords are incorrectly rendered in green (as if they were comments).
This behavior does not align with the expected VB.NET syntax highlighting rules.
Steps to Reproduce
Set the language of Monaco Editor to vb.
Paste the following VB.NET code into the editor:

Public Class Form1
Private Sub abc()
End Sub
End Class

Observe that the End Sub and Sub keywords are highlighted in green.
Expected Behavior
End Sub and Sub should be rendered in a different color, as per VB.NET syntax highlighting conventions, not in green.
Actual Behavior
End Sub and Sub are highlighted in green, which is incorrect.
Environment
Monaco Editor Version: [monaco-editor-0.52.2]
Browser: [Google Chrome-131.0.6778.140]
Operating System: [Windows 10]
Screenshots

Additional Notes
This issue appears to be related to the VB.NET syntax tokenizer used by Monaco Editor. It seems to misidentify certain keywords as comments.

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

1 participant