-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buggrammars
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Code
Use language=shell and this content:
foo-bar --baz gorpActual Behavior
Expected Behavior
Additional Context
The relevant regexp is here: https://github.com/microsoft/monaco-editor/blob/main/src/basic-languages/shell/shell.ts#L162
Perhaps the regexp, instead of /-+\w+/ should have a whitespace positive lookbehind? e.g. (?<=\s)-+\w+. I realize that this runs into problems with Safari and old IE... I am not familiar with the internals of monaco-editor, but perhaps there are already runtime guards in place that could be used here.
Or maybe something like [/(\s)(-+[\w-]+/, ["white","attribute.name"]]... but here my knowledge of monaco-editor source is too shallow at the moment to say with any certainty.
fwiw, vscode's markdown preview does not syntax color anything...

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buggrammars

