You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for making this great script, this is the only beautifier I could find online so far.
I installed PowerShell-Beautifier yesterday. I found a small issue when running your it, it converted most of my scripts fine except the following samples. It removed ` character from the if statement. I did a BeyondCompare to find that out. You can use the following sample to reproduce the issue. Thanks for looking into it.
Interesting, I just noticed I need to use \ to escape ` in the sample below, otherwise it won't show on github ~~~ so both github and PowerShell-Beautifier seemed to ignore it :)
SAMPLE
if ($line -match "[0-3]?\d[/| |-][ADFJMNOS]\w{2,9}[/| |-]\d{2,4}" -or ` # break the loop if an incorrect date ' MMM yyyy', ' MMMM yyyy', '-MMM-yy' format are found.
$line -match "[0-3]?\d/\d?\d/\d{2,4}" ) { ` # OR break the loop if an incorrect date format dd/mm/yyyy is found.
write-host "test"
}
The text was updated successfully, but these errors were encountered:
beancurd1
changed the title
Removed ` character from if statement
Removed ` character from if statement with Regex
Apr 16, 2022
Thanks for making this great script, this is the only beautifier I could find online so far.
I installed PowerShell-Beautifier yesterday. I found a small issue when running your it, it converted most of my scripts fine except the following samples. It removed ` character from the if statement. I did a BeyondCompare to find that out. You can use the following sample to reproduce the issue. Thanks for looking into it.
Interesting, I just noticed I need to use \ to escape ` in the sample below, otherwise it won't show on github ~~~ so both github and PowerShell-Beautifier seemed to ignore it :)
SAMPLE
if ($line -match "[0-3]?\d[/| |-][ADFJMNOS]\w{2,9}[/| |-]\d{2,4}" -or ` # break the loop if an incorrect date ' MMM yyyy', ' MMMM yyyy', '-MMM-yy' format are found.
$line -match "[0-3]?\d/\d?\d/\d{2,4}" ) { ` # OR break the loop if an incorrect date format dd/mm/yyyy is found.
write-host "test"
}
The text was updated successfully, but these errors were encountered: