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

Comma and Periods break Highlighting inside of Quotes. #14

Closed
gerane opened this issue Jul 27, 2016 · 1 comment
Closed

Comma and Periods break Highlighting inside of Quotes. #14

gerane opened this issue Jul 27, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@gerane
Copy link

gerane commented Jul 27, 2016

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

@gravejester gravejester added the bug label Sep 4, 2017
@gravejester gravejester added this to the v2 milestone Sep 4, 2017
@gravejester gravejester self-assigned this Sep 4, 2017
@omniomi omniomi mentioned this issue May 10, 2018
@omniomi
Copy link
Contributor

omniomi commented May 21, 2018

Fixed by #94

@omniomi omniomi closed this as completed May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants