PowerShell-Beautifier icon indicating copy to clipboard operation
PowerShell-Beautifier copied to clipboard

$i --

Open warm-ice0x00 opened this issue 3 years ago • 0 comments

$i-- is formatted to $i -- with the reformatter.
Example:

for ($i = 99; $i -gt 1; $i--) {
  Write-Output -InputObject "$i bottles of beer on the wall, $i bottles of beer."
  Write-Output -InputObject "Take one down and pass it around, $($i - 1) bottles of beer on the wall."
}

is reformatted to:

for ($i = 99; $i -gt 1; $i --) {
  Write-Output -InputObject "$i bottles of beer on the wall, $i bottles of beer."
  Write-Output -InputObject "Take one down and pass it around, $($i - 1) bottles of beer on the wall."
}

On the other hand, $i++ is still $i++ after reformatting.
Is this a bug or a feature?

warm-ice0x00 avatar Aug 14 '21 09:08 warm-ice0x00