A footnote label inside a %% comment counts as a reference: the footnote gets a second back link that leads nowhere

Steps to reproduce

Paste each sample into its own note and open it in Reading view.

Sample 1, a reminder in a comment that names the footnote:

Text[^1] and more.

%% check [^1] later %%

[^1]: The note.

Sample 2, an old definition kept in a comment:

Text[^1].

%%
[^1]: Old note.
%%

[^1]: New note.

Did you follow the troubleshooting guide?

Yes (reproduced in a fresh vault, no community plugins).

Expected result

A comment is hidden and takes no part in the note, so the footnote has one reference and one back link ↩︎.

Actual result

In both samples the footnote at the bottom ends in two back links, ↩︎↩︎. The second one targets the hidden [^1] inside the comment, so clicking it goes nowhere visible. In sample 2 the hidden [^1]: of the commented-out definition counts as a reference, although the definition inside the comment defines nothing.

getFileCache().footnoteRefs lists the hidden one too (sample 1: lines 0 and 2; sample 2: lines 0 and 3).

With the visible reference after the commented one, the reference itself is numbered as a second use: %% / [^1]: buried / %% / blank / use[^1] / blank / [^1]: real shows the reference as [1-1] instead of [1].

Environment

SYSTEM INFO:
	Obsidian version: 1.14.5
	Installer version: 1.14.4
	Operating system: Windows 11 Pro 10.0.26300
	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

Fresh vault, no community plugins, default theme. Also reproduced on the current Catalyst build.

Additional information

Links and tags inside comments are indexed on purpose, and this report is not about that. It is about the visible footnote rendering in Reading view.

Re-paste “Show debug info” before posting.


Credit: found by @saberzero1 with the remark-obsidian parity harness; I re-checked it on 1.14.5 and the current Catalyst build.

1 Like