Skip to content

Comma and Periods break Highlighting inside of Quotes. #14

Closed

Description

This just started happening in the latest Code Insiders 7/27

Sample Code

if ($ModuleResults)
{
    if ($ModuleResults.Installed -ne $null)
    {
        Write-Host "[INFO] " -ForegroundColor DarkMagenta -NoNewline
        Write-Host "Installed Modules: "  -NoNewLine -ForegroundColor Gray 
        Write-Host "$($ModuleResults.Installed -join ', ')" -ForegroundColor DarkGray
    }

    if ($ModuleResults.Updated -ne $null)
    {
        Write-Host "[INFO] " -ForegroundColor DarkMagenta -NoNewline
        Write-Host "Updated Modules: " -NoNewLine -ForegroundColor Gray 
        Write-Host "$($ModuleResults.Updated -join ', ')" -ForegroundColor DarkGray
    }

    if ($ModuleResults.FailedUpdate -ne $null)
    {
        Write-Host "[Error] " -ForegroundColor Red -NoNewline
        Write-Host "Module Update Failed: " -NoNewLine -ForegroundColor Gray 
        Write-Host "$($ModuleResults.FailedUpdate -join ', ')" -ForegroundColor DarkGray
    }

    if ($ModuleResults.FailedInstall -ne $null)
    {
        Write-Host "[ERROR] " -ForegroundColor Red -NoNewline
        Write-Host "Module Install Failed: " -NoNewLine -ForegroundColor Gray 
        Write-Host "$($ModuleResults.FailedInstall -join ', ')" -ForegroundColor DarkGray
    }
}

Here is how it looks by default

syntaxquotes

If I remove the dot in $ModuleResults.Installed it clears up.

syntaxnoperiod

If I remove the comma inside of the quotes, you can see that it clears up the rest of the syntax outside of the double quotes, but the -join ' ' is still wrong.

syntaxnocomma

Removing the double quotes still has all following syntax broken.

syntaxnodouble

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions