Improve bogus brackets filtering (#60364)

Closes https://github.com/zed-industries/zed/issues/59298

Left — before, right — after:

<img width="1604" height="1001" alt="Screenshot 2026-07-03 at 19 45 45"
src="https://github.com/user-attachments/assets/cc43b639-8fbe-4951-9da8-4b1e9482ca39"
/>

Release Notes:

- Fixed incorrect rainbow brackets highlights in certain cases
869d3579caKirill Bulatov committed on 7/21/2026, 11:54:00 AM· committed by GitHubparentcb498ac
2 files changedLine totals unavailable