Skip to content

whitespaceBetweenParameters removing code with spaces #1560

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

Closed
thedzy opened this issue Jul 29, 2020 · 2 comments
Closed

whitespaceBetweenParameters removing code with spaces #1560

thedzy opened this issue Jul 29, 2020 · 2 comments

Comments

@thedzy
Copy link

thedzy commented Jul 29, 2020

When enabling whitespaceBetweenParameters code is striped with the whitespace.

Example:
Write-Host $("-" * (Get-Host).UI.RawUI.MaxWindowSize.Width)
Becomes:
Write-Host $("-" (Get-Host)UI.RawUI.MaxWindowSize.Width)

The asterisk is removed

Example:
echo "Math $($x - $y)"
Becomes
Write-Output "Math $($x $y)"
The minus is removed

Example:
Write-Host "Argument $counter :" $arg
Becomes
Write-Host "Argument $counter $arg
One of the quotes and the colon

A post mentions this in another issue:

Originally posted by @PrzemyslawKlys in PowerShell/vscode-powershell#2696 (comment)

@SydneyhSmith SydneyhSmith transferred this issue from PowerShell/vscode-powershell Jul 30, 2020
@ghost ghost added the Needs: Triage 🔍 label Jul 30, 2020
@bergmeister
Copy link
Collaborator

Please provide the version of the extension and make sure you use the latest one. If you use the stable extension, then installing the latest PSScriptAnalyzer module and restarting the integrated terminal should fix it.

@thedzy
Copy link
Author

thedzy commented Jul 31, 2020

Reinstall everything and restart everything worked

@thedzy thedzy closed this as completed Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants