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

For footnotes linked via an id, use id when generating the hash #50

Open
LeaVerou opened this issue Jan 10, 2024 · 2 comments
Open

For footnotes linked via an id, use id when generating the hash #50

LeaVerou opened this issue Jan 10, 2024 · 2 comments

Comments

@LeaVerou
Copy link

Thanks for making this wonderful plugin!

I’ve been using this for a while, and this is the only place where I keep feeling there is room for improvement.
The syntax allows for specifying footnotes either with an id, or with a number:

Here is a footnote reference,[^1] and another.[^longnote]

[^1]: Here is the footnote.

[^longnote]: Here's one with multiple blocks.

However, when markdown is generated, links to footnotes still look like #fn1. This has the usual ordered reference problem: if more footnotes are added above a given footnote, its link changes. If it didn't work that way, using ids could have been a nice way to ensure that Cool URIs don’t change. I understand this may not always be desirable, but it could be a sensible default with an option to override it if the current behavior is desired.

@rlidwka
Copy link
Member

rlidwka commented Jan 10, 2024

This has the usual ordered reference problem: if more footnotes are added above a given footnote, its link changes.

Can you show a markdown example where that link changes?

@LeaVerou
Copy link
Author

This has the usual ordered reference problem: if more footnotes are added above a given footnote, its link changes.

Can you show a markdown example where that link changes?

I think I may not have explained this clearly enough. I was referring to the link changing as the content is edited (e.g. adding a paragraph with a footnote above another paragraph with a footnote). This is not something that can be "shown" as an example.

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

No branches or pull requests

2 participants