Unlinked mentions suggest linking part of a tag when hyphens are used in tag

Steps to reproduce

I have a note with a pretty simple name (e.g. “Example”). When I now use a tag that contains that name, and the tag uses a hyphen directly before the part that matches the note name (e.g. “#Tag-Example”), the Unlinked mentions widget suggests linking that part of the tag to that page. When clicking this suggestion, the link is created inside the tag (like so: “#Tag-[[Example]]”).

I do not really know if that is intended behavior. I’d argue, although it technically works to have a link within a tag, that it is not a good suggestion. In preview, this creates a link that looks like a single tag, but depending on what part you click, you either search for the tag or open the link.

Expected result

Unlinked mentions should never contain suggestions within tags.

Actual result

Unlinked mentions suggests to include a link within a tag.

Bildschirmfoto 2022-01-11 um 12.56.35


  • Operating system: macOS 12.1
  • No third-party plugins installed. Tested in a new and empty vault.
  • Debug info:
    Obsidian version: v0.13.19
    Installer version: v0.12.15
    Login status: logged in
    Catalyst license: supporter
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on
1 Like