Block linking is a little wonky with nested blocks. Specifically it’s impossible to link to a nested quote.
Steps to reproduce
Here’s a reproduction note:
> [!bug] Bug example 1
>
> > Nested block
>
> ^nested-block-1
[[#^nested-block-1|Nested block]]
> [!bug] Bug example
>
> > Nested block 2
>
> ^nested-block-2
>
> > Nested block 3
>
> ^nested-block-3
[[#^nested-block-2|Nested block]]
[[#^nested-block-3|Nested block]]
Did you follow the troubleshooting guide? [Y/N]
Yes.
Expected result
I’d like the identified block to be found for linking and floating preview.
Actual result
There a multiple issues.
Incorrect block ID assignment
When a blockquote has no ID of its own it will pick the last block ID inside. But it has its own ID then it uses it.
In the repro each top-level quote will pick the last block id inside it. This is also revealed in the suggestions popup.
Wrong ID assignment also manifests in the preview popups.
Here the whole top-level “bug” quote is shown, not the actually identified nested bloack quote.
Here, again, the whole top-level (second) “bug” quote is shown, including another nested quote that has its own id.
Missing Nested block IDs
Previous sections shows how IDs are misassigned. This is a related issue that IDs inside a block quote are not found and not assigned. For example ^nested-block-2
is completely ignored. Both in completion popup (see above) and in previews.
Environment
SYSTEM INFO:
Obsidian version: v1.8.9
Installer version: v1.8.9
Operating system: Darwin Kernel Version 24.3.0: Thu Jan 2 20:22:00 PST 2025; root:xnu-11215.81.4~3/RELEASE_X86_64 24.3.0
Login status: logged in
Language: en
Catalyst license: vip
Insider build toggle: on
Live preview: off
Base theme: adapt to system
Community theme: Minimal v7.7.19
Snippets enabled: 1
Restricted mode: off
Plugins installed: 3
Plugins enabled: 3
1: Admonition v10.3.2
2: Codeblock Customizer v1.2.8
3: Find orphaned files and broken links v1.10.1
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.