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

False positive match for here-string #26

Open
glucas opened this issue Apr 29, 2019 · 2 comments
Open

False positive match for here-string #26

glucas opened this issue Apr 29, 2019 · 2 comments

Comments

@glucas
Copy link

glucas commented Apr 29, 2019

I have a powershell script with this line (part of a loop looking for @xxx@ tokens in a file.

            $key = '@' + $_.Key + '@'

This is being interpreted as starting a here-string so everything after that in the file has the wrong syntax highlighting.

@glucas
Copy link
Author

glucas commented Apr 29, 2019

Workaround is to add a comment char or whitespace at the end of the line. The issue appears to be having a line ending with @'$.

@audreytoskin
Copy link

I've also noticed this issue, even when the at sign is backtick-escaped. Something like

Write-Host "`@"

will continue syntax highlighting for a string until the next quotation mark, even though that's actually the beginning of a different string.

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