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

#Requires syntax highlighting bug #210

Open
5 tasks done
aslan-im opened this issue Dec 24, 2021 · 2 comments
Open
5 tasks done

#Requires syntax highlighting bug #210

aslan-im opened this issue Dec 24, 2021 · 2 comments

Comments

@aslan-im
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

There is the #Requires syntax highlighting bug. If there is some module with letters and numbers in module name, add-in highlights part with first block of letters and numbers and the rest chars highlight as a comment.
You can reproduce the issue if add the code below to ps1 file

#Requires Microsoft365DSC

Will be highlighted only the part of the module name. All characters follow after 365 will be highlighted as comment.
The funny thing, is that the module name highlighted in the same manner on github as well 😁

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.63.2
899d46d82c4c95423fb7e10e68eba52050e30ba3
x64

Extension Version

ms-vscode.powershell@2021.12.0

Steps to Reproduce

You can reproduce the issue if add the code below to ps1 file

#Requires Microsoft365DSC

Visuals

No response

Logs

No response

@JustinGrote
Copy link

Thanks for the report! Have you tried the preview version of the extension and see if it is still an issue there?

@andyleejordan
Copy link
Member

This looks to be an EditorSyntax issue: notice how it's reproing on GitHub itself. Transferring...

@andyleejordan andyleejordan transferred this issue from PowerShell/vscode-powershell Dec 27, 2021
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

3 participants