@PeterJones said in PowerShell parenthesis matching:
The SciTE brace-matching (^E = Ctrl+E = Edit > Match Brace) works on the second line, but not on the first line.
However, more examples show: if I use real quotes rather than smart quotes:
$($s.replace(”’","’’"))
( ( ) )
$($s.replace("'","'"))
The third line, which has true ASCII " and ', the brace matching works fine in SciTE 4.2.0.
In Notepad++, if I leave that first line there, but add the third, it still thinks it is inside a string, which confuses things. But if I remove the first line and just have
( ( ) )
$($s.replace("'","'"))
… then Notepad++ brace-matching with Ctrl+B works for me.
@magoo104 , could you paste in some actual PowerShell syntax that shows the problem – once you paste it in the forum, highlight the text and click the </> button in the forum entry toolbar,
so that your PowerShell will be properly in a black box, and the Forum won’t try to “fix” your " " to “ ” or similar smart-quotes.
And I did confirm: in v7.9.2, with the most recent text shown, it properly highlights matching braces, as shown in this screenshot
08e8ec17-3a95-4497-b48e-adbf7a464f00-image.png
… and Ctrl+B works correctly as well.
So it was only with mismatched quotes and “smart quotes” that the problem occurs for me. With balanced ASCII quotes, it works just fine.