Remove extra space from MD Footnote Action

Been using @MyGeekDaddy action: MD Footnote

It currently sends footnotes to the bottom of the page with line breaks between each footnote, like so:

[^1]: one two three

[^2]: …four five (six)

[^3]: seven, eight, nine

Is there a way to alter the script so each new line immediately follows the next, like so:

[^1]: one two three
[^2]: …four five (six)
[^3]: seven, eight, nine

I just don’t see where this happens…
Thanks.

1 Like

Try this:

  • Look in the original action for \n\n, that’s where the double line feed is added. Looking at the conditiona and the associated comment, that additional newline character for entries after the first seems to have been a bug.
  • I’ve fixed a bug where the colon was being added to the wrong footnote element for the first item.
  • I’ve set the editor to activate at the end so the cursor placement takes effect immediately if triggered from the action library given that some of the code specifies an end of action selection.
  • I’ve removed the keyboard shortcut as it conflicted with an existing keyboard shortcut for me.

Hope that helps.

1 Like

Really helpful for the next action modification:

Thanks so much for this update… exactly what I was looking for…

And I had noticed this but did not realize it was a bug:

The double new line entry was on purpose due to my preference on separating the footnote entries. If you want to keep the action, edit the MD Footnote and update line 43 to remove one of the \n entries:

1 Like