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:
Opening internal link brackets hidden; closing single bracket should be grey.
Works fine.
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
Works fine.
Works fine.
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.
Works fine.
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
Actual result / 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.
Displays “link(/file.md)”, and opens a new file called “link”.
Environment
SYSTEM INFO:
Operating system: ios 15.6.1 (Apple iPhone)
Obsidian version: 1.4.3 (95)
API version: v1.1.16
Login status: not logged in
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
Some things I have tried:
Inserting spaces like this [ [link] ](/file.md) . This simply displays the whole thing in plain text in the reading mode and the link doesn’t work at all.
Turning wikilinks back on. This doesn’t seem to change anything. I still see “link(/file.md)” in the reading mode, and it still opens a new note called “link”.
Respectfully I disagree. Single square brackets seems to be required by the current implementation in Obsidian, which prioritizes Wikilinks over original markdown links, but it is by no means a requirement for Markdown links in general.
So it does look like a bug to me. I started the discussion in the Help section initially instead of a bug report, because it was not obvious to me if there was a further setting I needed to click to get the standard behavior.
Standard markdown behavior would render the inner set of square brackets in the output, as shown in my last post. I am aware of what the original spec says - I want to see that second set of square brackets! That is what I would expect and how I like to use links. Obsidian does not do this even with Wikilinks disabled.
No. I’m also not testing with plugins and snippets off, tho, which I should do (tho I wouldn’t expect it to affect this). I’m testing on an iPad, which shouldn’t matter but it is a difference.
Oh wait, I see — looks like they work in Reading View. They don’t work in Live Preview.
Great. I work in source and read so hadn’t looked at live preview. Checking now, I see the links in live preview but they aren’t displayed as cleanly as in read mode.
Hopefully this all adds to the pot for the OP and developers.
Expected: The text should show name [with brackets] and opening the hyperlink should create a note link.md.
Actual result
Actual: The text shows [name [with brackets]] where square brackets belonging to hyperlink formatting are shown in the hyperlink text and nothing happens when opening the link.
Yep, I just experienced this too! In the editor mode view only.
My test file
[link name without brackets](https://obsidian.md/)
[[link name] with brackets at start](https://obsidian.md/)
[link name with [brackets] in the middle](https://obsidian.md/)
Expected behavior: Obsidian should treat the outer square brackets as part of the standard Markdown link syntax in all three cases. They should appear, when the cursor enters the link. The should disappear, when the cursor leaves the link.
I’d expect Markdown to be first priority in rendering Markdown. Wiki links should have second priority.