Trim off surrounding `[]` when parsing terminal hover links (#2906)

Follow-up of https://github.com/zed-industries/zed/pull/2899

Terminal has to accept `[` and `]` as valid word parts, due to
`[slug].tsx` being a valid file name.
Yet, terminal has to exclude these to match paths in strings like
`[/some/path/[slug].tsx]`.

Release Notes:

- N/A
1c6964ee96Kirill Bulatov committed on 8/29/2023, 7:49:33 AM· committed by GitHubparents9aad6027c498fe
1 file changedLine totals unavailable