Erratic handling of nested square brackets in live preview

There are bug reports of people not liking the way things in non-escaped single square brackets are highlighted (see this and this). I don’t think they should be highlighted either, but I realise that’s just a personal preference!

But preference aside, live preview is currently handling nested non-escaped square brackets erratically. Reading view displays everything perfectly sensibly and consistently so I’d describe this as a bug/set of bugs rather than personal preference. I hope I’ve managed to document this well!

Steps to reproduce

Here’s a test note in a brand new vault that has had nothing doing to it other than toggling live preview on:

Square bracket testing.md (1.6 KB)

Here’s a screenshot of live preview:

Expected result

  1. Works fine.
  2. Works fine.
  3. Opening internal link brackets hidden; closing single bracket should be grey.
  4. Works fine.
  5. Single square brackets should be visible; the text that’s not a link shouldn’t be underlined; the external link should be displayed as usual.

Actual result

  1. Works fine.
  2. Works fine.
  3. You can still see the opening double brackets for the internal link; the closing single bracket is black when it should be grey to match the opening bracket and to match the behaviour in examples 1 and 2.
  4. Works fine.
  5. Single square brackets not visible; text that isn’t a link is underlined; the external link is displayed as raw text, not in its live preview form.

Environment

SYSTEM INFO:
Obsidian version: v0.14.5
Installer version: v0.14.2
Operating system: #1 SMP Debian 5.15.15-1 (2022-01-18) 5.15.0-3-amd64
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: light
Community theme: none
Snippets enabled: 0
Safe mode: on

1 Like