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

Syntax highlight doesn't recognize '#text' property #238

Closed
stej opened this issue Aug 16, 2016 · 1 comment
Closed

Syntax highlight doesn't recognize '#text' property #238

stej opened this issue Aug 16, 2016 · 1 comment

Comments

@stej
Copy link

stej commented Aug 16, 2016

I have this code:

Get-SomeXml | 
Select-Object -ExpandProperty Node |
        % { if ($_.'#text') { $_.'#text'.Trim() -split ',\s*' }
            else            { @() }
        }

The syntax highlighter is confused from the ending apostrophe behind the #text property.

image

The problem is probably caused by the hash sigh #, because once I remove it, it is ok.

Workaround

$textProp = '#text' # just workaround because of syntax highlighter

Get-SomeXml | 
Select-Object -ExpandProperty Node |
        % { if ($_.$textProp) { $_.$textProp.Trim() -split ',\s*' }
            else            { @() }
        }
@daviwil
Copy link
Contributor

daviwil commented Sep 8, 2016

Hi @stej, I apologize for the long delay in replying to this. We're tracking all of our syntax highlighting issues over at the PowerShell/EditorSyntax repo now. I've moved your issue there to be addressed. Thanks!

@daviwil daviwil closed this as completed Sep 8, 2016
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

2 participants