Improve footnotes in headings

Steps to reproduce

  1. create a note and input two h1 headings
    ‘# test h1 with footnote[^1]
    ’# test h1 with footnote[^2][^3]

  2. creat another note and create link refer to h1 headings above
    ![[footnote bug#test h1 with footnote[ 2][ 3]]]
    Ref:安装 WSL | Microsoft文档WSL 基本命令 | Microsoft LearnWSL 高级设置 | Microsoft Learn

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

y

Expected result

Plz solve the three problems mentioned below

Actual result

The following issues can be reproduced in a sandbox environment:

  1. When a heading with a footnote is set as a link, the last bracket of the link becomes isolated. I will attach two images showing this issue in both preview and non-preview link modes.
    image
    image
  2. When a heading title has two or more footnotes, if the link refer to that heading is in preview mode, and there is a hyperlink in the subsequent text of the article which using this link. a “failed to load image” icon will appear at the location of the hyperlink.
    image
  3. When entering a link refer to headings with footnotes, if it is selected from a popup after typing [[Note Name#]], there will be meaningless spaces before the number in the footnote (It is estimated that the ^ in the footnote syntax is not displayed properly). Deleting the spaces does not affect the normal referencing of the double-bracket link. Refer to the images above for examples.

Environment

SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.5.12
Operating system: Windows 10 Pro 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0

RECOMMENDATIONS:
none

Sorry for posting two identical bug reports, the format of the previous bug report was incorrect, this is a rewritten version, could administrator delete the previous one? Thank you.

Another small question about headings with footnotes is: If footnotes are added to headings such as H2 titles within the note, the table of contents in the sidebar does not display these footnotes correctly but instead adds a number.

This neither realizes the function of footnotes nor is beautiful at all. I suggest removing the footnotes directly from the side table of contents because people do not need to use the footnote function in the side table of contents.

  1. Okay
  2. Okay
  3. is not necessarily a bug.
  4. maybe we can improve on the outline

Thanks a lot for your hard work :kissing_heart:

Hey Obsidian team!

I’ve come across a small bug when adding footnotes to headings. The Outline pane shows the raw footnote syntax (like [^1]) instead of rendering it properly, which looks a bit messy.

Also, even if I add a space between the text and the footnote to separate them, the number still appears without proper formatting in the outline, making it look out of place. It would be great if the Outline could handle these more cleanly!

It would be great if the Outline could either render the footnote properly or just hide the syntax so it stays clean. Keep up the great work!

Thanks for the amazing tool!

In the future, please include and fill out the bug report template including the output of the “debug info” command as asked for. Thanks.


Looks like the same as point four here:

I think your report could be merged with this one, but I’ll let the team decide.

Thanks for the response. Got it, here’s the debug info:

SYSTEM INFO:
Obsidian version: 1.12.4
Installer version: 1.12.4
Operating system: Windows 11 Pro 10.0.26200
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: light
Community theme: Border 1.13.2
Snippets enabled: 2
Restricted mode: off
Plugins installed: 18
Plugins enabled: 18
1: Hotkeys++ v0.2.7
2: Settings Search v1.3.10
3: Iconic v1.1.8
4: Tag Wrangler v0.6.4
5: Auto Link Title v1.5.5
6: Folder notes v1.8.18
7: Note Toolbar v1.29.24
8: Underline v1.3.0
9: Paste URL into selection v1.11.4
10: Style Settings v1.0.9
11: Image Zoom & Drag v6.1.3
12: Dataview v0.5.68
13: QuickAdd v2.12.0
14: Templater v2.18.1
15: Book Search v0.7.5
16: Pretty Properties v1.10.17
17: Kanban v2.0.51
18: Calendar v1.5.10