-
Notifications
You must be signed in to change notification settings - Fork 45
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
PowerShell comment recognition is not correct #161
Comments
@stefanita-mitran I can reproduce this, but it also occurs in PowerShell ISE. I'll move this issue to the owners of the PowerShell grammar. |
@stefanita-mitran, (and @alexr00) I do not see how those are not in fact comments. I think your use of the backtick is incorrect. A backtick before a space serves no purpose at the beginning of an unquoted argument, the tokenizer still skips it as its just a 'space'. This might be slightly different than in CMD where Here is your code rendered with PR #156: It appears I do have an error in my PR, as its attempting to behave as you suggest, but this is not how PowerShell actually behaves. I tested on Windows PS 5.1 and also on PS 6.2 RC 1 and they both treated the comments as actually comments. This also means that the statement ends after the |
Clarification, the current grammar is behaving correctly, PR #156 would have caused a regression, and a recent commit has resolved that, as shown in the image in #161 (comment). |
Ah, I thought there was some extra change need to get to the correct behavior in #161 (comment). |
From @stefanita-mitran on March 4, 2019 9:50
EG.
The example above shows that the "arg1" and "arg2" have incorrect comments and should not be categorized as
comment.line.powershell
Copied from original issue: microsoft/vscode#69771
The text was updated successfully, but these errors were encountered: