obsidian-linter: Bug: Re-Index footnotes also moves footnotes to the bottom
- I have verified that I am on the latest version of the Linter
Describe the Bug
Re-Index Footnotes moves footnotes to the bottom, even when Move Footnotes to the bottom is unticked.
How to Reproduce
Steps to reproduce the behavior:
- In Linter settings, make sure Re-index Footnotes is turned on and Move Footnotes to the bottom is turned off.
- Make a new document with the following text (without blockquotes):
foo [^1]
[^1]: bar
foobar
- Lint manually or via auto-lint on save.
Expected Behavior
Expected behavior is that nothing should happen.
Device
- Desktop
- Mobile (iOS)
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Reactions: 3
- Comments: 37
I just merged in the change for this bug. Hopefully it will fix most, if not all, of the issues mentioned. It is now on master and should be in the next release. Please let us know if there is an issue with either of those.
Thanks again for all of the feedback and help on this!
That is correct. I missed the zip process. Here is a new zip (I hope). If not it will need to wait until tomorrow.
main.zip
I see the issue. It was a bug in the regex for the footnote definitions which was causing the issue. I already fixed it before I saw it causing the issue with your results (so like 30 minutes ago). But I need to create a new
main.zipfor testing. Then I think I am going to call it a night.Now that I am thinking a little harder about this, I can probably fix this by doing some tinkering to some logic.
@pjkaufman I can confirm: “Re-Index footnotes” moves footnote to bottom without “Move Footnotes to the bottom” enabled.
It also doesn’t do this cleanly: The link in my footnote which is getting moved to the bottom is getting replaced by the last
[link](addr)-formatted link in my document. It is also causing the last item in a list to be moved to the next header below for some reason. “214 added, 242 removed”. My guess that’s a side effect of the original error?I have had to disable “Re-Index footnotes” because of this.
I wrote a PM in which I put my name and title after a “—” and exported to PDF. It looked very weird having the footnotes under that. 😃