Linking to headers that are inside of callouts

Use case or problem

I love callouts for their ability to group (fold-able!) content under a heading with a background colour and icon to make it stand out compared to a normal paragraph. But they often interact with other Obsidian features in strange ways that make them cumbersome to use and feel like an afterthought. This topic is narrowed to specifically deal with their strange behaviour surrounding headings inside a callout.

Headings inside callouts cannot be linked to or referenced in the same way that headings for normal paragraphs can. For example, the link to the heading # Foo in the following snippet does not work and will link to nothing:

(Example 1)

> [!info]+ A Collapsible Info Callout
>
> # Foo
>
> Lorem ipsum dolor sit amet

[[#Foo]] <- broken, links nowhere

But outside of a callout, this works as expected:

# Foo

Lorem ipsum dolor sit amet

[[#Foo]] <- Creates a link to Foo and all of its sub-paragraphs/sub-headings

I originally thought it might be possible to use blockquotes to “sneakily” link to headings, but it turns out that doesn’t work either. The link to the blockquote ^bar in the following snippet does not work and will link to nothing:

(Example 2)

> [!info]+ A Collapsible Info Callout
>
> # Bar
> ^bar
>
> Lorem ipsum dolor sit amet

[[#^bar]] <- broken, links nowhere

But outside of a callout, this works as expected:

# Bar
^bar

Lorem ipsum dolor sit amet

[[#^bar]] <- links to *only* the Bar heading in the text above

As an aside, headings inside callouts also do not show up in the pane from the Outline core plugin.

Proposed solution

Headings (and blockquotes I suppose) should interact with the rest of the Obsidian ecosystem while inside a callout in the same ways that they are expected to behave when they are not inside of a callout.

The first example from the previous section should create a valid link to the heading # Foo regardless of whether it’s in a callout or not. The Outline core plugin should be able to identify headings inside callouts and provide them in the outline pane as clickable links just like it already does for headings that are not inside a callout.

While not specifically related to headings in callouts, it would also be nice if the second example from the previous section would also create a valid blockquote reference to the heading # Bar which can be linked to as expected.

Current workaround

None that I could find in vanilla Obsidian. My original idea of using blockquotes also does not work as it turns out that blockquotes also interact with text inside a callout in strange ways.

Related feature requests

Not the same as what this topic is discussing; but is definitely related. This other topic refers to the actual heading of the callout itself having the ability to be linked to.


Also not the same as what this topic is discussing; but is also definitely related. This other topic is specifically talking about the actual heading of the callout itself should show up in the Outline core plugin. In this topic, I am also suggesting that the headings inside callouts should also show up in the Outline core plugin.

6 Likes

Yes, this would be good. Closely related (close enough to not merit its own feature request?) — ability to link to blocks/paragraphs inside callouts, in addition to headings.

2 Likes

Any update on this? It would be great if headers inside a callout would actually show up in the Outline like normal Headers.

2 Likes

+1 like i wrote in the other thread