Steps to reproduce
- Create a new note and write some content
- Add a footnote[1] which contains a newline
- Observe that the footnote styling is applied only to the first line of the footnote within the editor in live edit mode and also in source mode
- Switch to reading mode and observe the correct styling across both lines of the footnote
Did you follow the troubleshooting guide?
Yes. Reproduced in the sandbox vault.
Also, the issue is reproduced regardless of the status of the “strict line breaks” setting, which correctly renders the newlines in reading mode according to that setting but doesn’t affect edit mode.
Expected result
The editor applies the footnote styling to every line of a multi-line footnote.
Actual result
The editor only applies the footnote styling to the first line of a multi-line footnote, but reading mode includes them.
Environment
Additional information
I believe that the logic that decides what lines fall into the CSS class HyperMD-footnote
needs to be adjusted.
Markdown to reproduce the issue:
Lorem ipsum odor amet, consectetuer adipiscing elit.[^footnote]
[^footnote]: line one
line two
Screenshot of the issue
This is a screenshot exhibiting the issue in the sandbox vault. On the left is edit source mode, on the right is reading mode.
Note the difference in font size on the left pane’s footnote: the first line is smaller than the second, but they are both part of the footnote and should be the same style.
Debug info
SYSTEM INFO:
Obsidian version: v1.7.7
Installer version: v1.7.7
Operating system: #1 SMP PREEMPT_DYNAMIC Mon, 09 Dec 2024 11:58:37 +0000 6.12.4-1-MANJARO
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
a standard footnote;
not inline ↩︎