obsidian-linter
obsidian-linter copied to clipboard
FR: Add Support for Inline Footnotes for `footnote-after-punctuation` and `re-index-footnotes`
can you share an example? Would help me since I don't use footnotes myself :)
Inline footnotes are written as follows:
This is a sentence.^[This is an inline footnote!]
The difference to regular footnotes is that 1) the caret goes outside of the brackets, and 2) the footnote content is written inline inside the brackets instead of writing it in its own block elsewhere.

An example of inline footnotes is also included in the Obsidian Help vault.
This issue also affects re-index-footnotes. Currently, mixing inline footnotes in-between regular ones will cause re-index-footnotes to assign mismatching indexes to the ones shown in preview. This is shown in the picture in the above comment.
To clarify, @sampokantola , you are saying that the inline footnotes need to be left where they are in the file instead of having them moved to the end of the file, right?
@pjkaufman Yes, that's what I'm suggesting here: Move inline footnotes after punctuation, but still keep them inline.
(Also update re-index-footnotes to account for inline footnotes, so the regular ones after an inline footnote are incremented by 1 even though inline footnotes don't have a number in the markup.)
But I also had the idea for a new lint rule that would automatically convert inline footnotes into regular ones if they surpass a configurable character limit—but looks like I never made a feature request about that.