Embedded header sections duplicate header name in hover preview if the linked header shares the same name

Steps to reproduce

I have attached the files used to reproduce, but in essence, you need to create a note that embeds a header of the same name.

Did you follow the troubleshooting guide? [Y/N]

Yep!

Expected result

I expect only 1 header in the preview.

Actual result

I see two “titles” or headers, even though only one is linked, and the linked note does NOT have two titles as such. :slight_smile:

Environment

SYSTEM INFO:
Obsidian version: v1.7.4
Installer version: v1.7.4
Operating system: Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 24.0.0
Login status: logged in
Language: en
Catalyst license: vip
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Files are here. The “Untitled” note demonstrates it.

Untitled.md (24 Bytes)
Tree.md (32 Bytes)
Unarmored Tree Footer.md (66 Bytes)
Unarmored Tree Header.md (66 Bytes)
Unarmored Tree.md (120 Bytes)


Since it takes a LOT to cause this, I would say this could remain tagged as minor. It is mainly noticeable when dealing with transcribing notes from a PDF or book, where multiple headers of the same name can be used throughout.

Hover preview shows two headings if the referenced note contains a quote from another note. Is this a bug or am I missing something?

Image