obsidian-footnotes
obsidian-footnotes copied to clipboard
FR: footnotes placed at end of paragraph, not end of file
It'd be great to have an option in the settings to choose to put footnote links at the end of a paragraph (creating a new line break) rather than all the way at the end of the file.
With long files, it can be annoying to go back and forth between the bottom of the file and the active editing area.
PS, otherwise I love this extension. Thank you!
This would definitely be a useful feature. I do have some questions about how you would like me to handle edge cases though. Can you take a look and see if your views differ from my suggestions?
Case 1: 2 paragraphs, 1+ blank line(s) in between
Paragraph 1
Paragraph 2
In this case, I should place the footnote between the 2 paragraphs, padding around the footnote with blank lines so it works correctly:
Paragraph 1 [^footnote]
[^footnote]: blahblah
Paragraph 2
Case 2: 2 paragraphs, no blank line in between
Paragraph 1
Paragraph 2
In this case, I should insert the footnote between the 2 paragraphs, padding them like before:
Paragraph 1 [^footnote]
[^footnote]: blahblah
Paragraph 2
Case 3: bulleted list
Writing before…
- paragraph 1
- paragraph 2
- paragraph 3
- paragraph 4
Writing after…
In this case, adding footnotes between paragraphs breaks the bulleting completely. To avoid this problem, I should place the footnote in the first line break.
Writing before…
- paragraph 1
- paragraph 2 [^footnote]
- paragraph 3
- paragraph 4
[^footnote]: blahblah
Writing after…
I think you've nailed it!
The second case is tricky, but I support your implementation.
In some markdown languages, two lines with only one line break and no spave in between get rendered as one paragraph. I think this is true for Quarto and maybe Hugo, for example.
In GitHub markdown this is two lines:
Paragraph1 line one Paragraph2 line two
But in other markdowns it may just be one paragraph on one line.
But if someone has a line break then they probably want a new paragraph. So splitting the two lines makes sense.
But ultimately, design it how you want!!! I'd just be an appreciative user. Thank you!