Unlinked mentions detected in wrong parts of the document

Steps to reproduce

  1. Create note with some name or alias (e.g. foo)
  2. Create new note and add an inline tag #foo, or an inline or fenced codeblock with foo in it (e.g. use foo::bar)
  3. Open the Outgoing Links of the second note, and the tag/code block will be among the detected mentions

Agreeing for the tag content be converted into a link breaks the tag, naturally. Similarly link is just going to be displayed as [[foo]] in the code block without becoming a link… And will still be detected as unlinked mention

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

Y

Expected result

Inline tags and code blocks should be excluded from unlinked link detection

Actual result

Unlinked mentions get polluted with invalid entries when there exist notes with the same name. Particularly relevant when you have code listings in a note that might have name of a library in an import statement, while also having a dedicated note for said library

Environment

SYSTEM INFO:
	Obsidian version: v1.7.4
	Installer version: v1.7.4
	Operating system: #1 SMP PREEMPT_DYNAMIC Wed, 23 Oct 2024 17:28:15 +0000 6.6.58-1-lts
	Login status: not logged in
	Language: en
	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