Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renumber footnotes #89

Closed
yshavit opened this issue Jun 30, 2024 · 1 comment · Fixed by #185
Closed

renumber footnotes #89

yshavit opened this issue Jun 30, 2024 · 1 comment · Fixed by #185
Labels
enhancement New feature or request
Milestone

Comments

@yshavit
Copy link
Owner

yshavit commented Jun 30, 2024

If I have a footnote [^a], it gets rendered by GFM as [1]not [a].

I should accordingly canonicalize the footnotes on output, so that they look like the text they'll eventually become.

This should be an option, defaulting to on.

@yshavit yshavit added the enhancement New feature or request label Jun 30, 2024
@yshavit yshavit added this to the 1.0 milestone Jul 24, 2024
@yshavit
Copy link
Owner Author

yshavit commented Aug 11, 2024

Testing the interaction of footnotes and link references:

[hello][3], world[^3] [^a] [^1] [^shortcut] [^collapsed][].

[3]: https://example.com
[^a]: a footnote
[^3]: this is my footnote text.
[^1]: my second footnote text.
[^shortcut]: my shortcut footnote text.
[^collapsed]: my collapsed footnote text

results in:

hello, world1 2 3 4 5[].

So it looks like:

  • links and footnotes are in different namespaces
  • shortcut footnotes work
  • collapsed footnotes are treated as shortcut (with an additional [] as just plain text)
  • GitHub's rendering renumbers all footnotes, starting at 1

Footnotes

  1. this is my footnote text.

  2. a footnote

  3. my second footnote text.

  4. my shortcut footnote text.

  5. my collapsed footnote text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant