PowerShell / EditorSyntax

PowerShell syntax highlighting for editors (VS Code, Atom, SublimeText, TextMate, etc.) and GitHub!
MIT License
133 stars 45 forks source link

.bat & .exe Syntax Highlighting Error #46

Closed thomasrayner closed 6 years ago

thomasrayner commented 7 years ago

There's syntax highlighting to indicate commands which makes things like something.bat and ipconfig.exe the same color as PowerShell cmdlets like import-module. The highlighting for .bat and .exe files doesn't properly detect when .bat or .exe is part of a longer word.

Code to reproduce

ipconfig.exe
Import-Module AzureRM.Backup
Import-Module AzureRm.Batch 
Import-Module AzureRm.Exefake
Import-Module AzureRM.Cdn

Result of code

Using Monokai Dimmed theme for emphasis. image Lines 4 and 5 have incorrect syntax highlighting.

Diagnostic info

ms-vscode.PowerShell@0.11.0
ms-vsts.team@1.115.0
msazurermtools.azurerm-vscode-tools@0.3.4
yanz.markdown-authoring@0.1.5

code -v
1.11.2
6eaebe3b9c70406d67c97779468c324a7a95db0e

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.1066
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1066
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
MovGP0 commented 7 years ago

this can be reproduced on GitHub too:

ipconfig.exe
Import-Module AzureRM.Backup
Import-Module AzureRm.Batch 
Import-Module AzureRm.Exefake
Import-Module AzureRM.Cdn

Seems to be the related to #39

omniomi commented 6 years ago

As of the most recent commit this is fixed:

fixed3