You are here: PSPad forum > English discussion forum > Powershell highlighting anomaly
Posted by: clanman | Date: 2023-02-19 03:18 | IP: IP Logged
I find myself using PowerShell quite a lot these days and PSPad has come a long way in supporting its quirks over the past 12 months or so - Thanks Jan
I have found a quirk in bracket highlighting. Take the code below which works as expected. If you put the cursor next to either curly brace{}
the matching brace is highlighted.
$eg = 0
if ($eg -gt 1)
{
Write-Host '$eg is greater than 1'
} # end if ($eg -gt 1)
Now the exact sane logic here except notice there is no space between the hash (#) symbol (Powershell comment starter) and the last brace (}).
$eg = 0
if ($eg -gt 1)
{
Write-Host '$eg is greater than 1'
}# end if ($eg -gt 1)
This only seems to happen with the sligle line comment character. It does NOT happen with the block comment characters (<#.....#>).
Posted by: pspad | Date: 2023-02-21 13:06 | IP: IP Logged
Thank you for info.
Parsing in General (user) highlighter is quite complicated. Fixed, available in the next build
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR