Support for Linking To/Embedding Ranges

Use case or problem

I heavily use internal linking and embedding in my notes. However, not all of the things I’m linking to fit neatly into a hierarchy, where I can just embed/link a single block or heading. Thus, I find myself having to add links to multiple sequential headings or blocks in the same document. Instead of having to add this list of links, it would be nice to be able link to a range or headings or blocks in another document.

Proposed solution

Sample Doc A:

filename: Genesis 001.md
---
# Genesis 1

## 1
In the beginning God created the heavens and the earth.

## 2
Now the earth was formless and desolate, and there was darkness upon the surface of the watery deep, and God’s active force was moving about over the surface of the waters.

## 3
And God said: “Let there be light.” Then there was light.

Sample Doc B:

Allow hash fragment to link to a range of headings (here using a hyphen as the range separator, but this could be something else):

See [[Genesis 001#1-3]]

Current workaround (optional)

Current work around: include multiple single-heading links:

See [[Genesis 001#1]], [[Genesis 001#2]], [[Genesis 001#3]]
17 Likes

I would really like this. I came searching this forum for exactly this and this represents my use-case pretty well.

I think the proposed syntax needs to be tweaked a bit. Perhaps:

[[Genesis 001#1-#3]]

I think that would make it more clear that the 3 is another block below the first block.

I’m not a programmer, but I do wonder what would happen if a block had a “-” in the name. That might be the thing that makes this the most difficult to implement. Maybe something like this could solve for that:

[[[Genesis 001#1]]-[[Genesis 001#3]]]

That doesn’t seem very elegant either.

Bottom line: This seems difficult, but I would love to see it.

+1 for this request! :+1:

Also, dendron currently supports this syntax:

![[NAME.OF.NOTE#STARTING-HEADER:#ENDING-HEADER]]

Might be nice to be compatible.

Related feature requests:

1 Like

I would love for heading embeds to simply respect the heading hierarchy. In other words, given this content:

## Test Heading

Content

Content

### Child heading

More content

## Next Sibling

This embed code: ![[link#Test Heading]] would display all of the above text until the “next sibling” heading. That is, embedding a second level heading would also automatically pull in third, fourth, etc level headings.

1 Like

Yes! Please this! Working with policy would be much easier if hierarchies were respected

That’s a good idea, but it is really a separate feature request. The original post is about linking to or embedding ranges of blocks that are at the same heading level.

1 Like