Closed aeschli closed 6 years ago
Just to understand this move of the issue. VS Code 1.21 is using PowerShell/EditorSyntax, and version 1.20 is not using it. Is that correct?
I don't see recent updates in PowerShell/EditorSyntax, so VS Code was not broken by an update in this repo.
Yes, correct, the latest 1.21-insider builds are now using the grammar from PowerShell/EditorSyntax. This fixed some issues, but there will be some new issues that come to light.
Hey Martin, I think this change shouldn't have been made yet. We. Used this grammar once before in VS Code but had to pull it back out due to the many issues that it has. @gravejester has been working on a totally revamped version but it hasn't been merged yet. I apologize for not mentioning this sooner but I haven't been able to keep a close eye on these projects since I left Microsoft. Let me know if you have any questions!
@daviwil Would you mind hosting the 'old' grammar in a separate repository (or in PowerShell/EditorSyntax)? We want these grammars to be available also for other editors and want a place to move the issues to.
@aeschli PR #68 will move this repo back to VS Code's version of the grammar until V2 is done.
@daviwil Great, thanks a lot!
@daviwil I updated the Powershell to the latest from this repo. That means we are back to what we had in 1.20 and this bug is fixed.
From @iricigor on February 16, 2018 10:17
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
Installing PowerShell extension has no impact on behaviour
Code to paste
Expected result
Here is screenshot from stable VS Code 1.20.1 Syntax highlighting is as expected. Notice command in last line.
Actual result
Here is screenshot from Insiders VS Code 1.21.0
Explanation
Notice again command in last line. It is not correctly colored now. Code itself is correct.
The actual problem is in previous line. Token '=' is not parsed properly (opening and closing apostrophes are not matching). The same thing happens also with quotation marks (i.e. "=" will be wrong), but also other spoecial characters instead of equal sign, like %, !, etc.
Furthermore, this happens only when there is a dot in the beggining of the same line. If code would be
$a = $p -split '='
or if there would be another dot in the same line$a = $p.name -split '.'
, parsing would be fine.Copied from original issue: Microsoft/vscode#43816