You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to implement footnotes. Here's my footnote, this would go inline in a paragraph:
[1]($link.ref("1").attrs("footnote")
Later in the text, I'd have the content for the footnote, as another link:
[^1]($link.url("https://example.com").id("1"))
However, I get an error saying that "1" is an invalid ref. If I change the second snippet to be a heading instead of a link, then it works as expected.
[EDIT] Maybe ref thinks that only sections can be linked to? I can see why that would be reasonable in most cases, but in the case of footnotes this is a bit annoying because I don't want all my footnotes to show up in the table of contents.
The text was updated successfully, but these errors were encountered:
Linking to ids defined in the same content page is a corner case (totally legitimate one, but still) that is not implemented yet. We had some false negatives before when linking to non-section Ids from superhtml, but this one is a separate thing.
Now that v0.7.2 is out, this is currently at the top of my list of missing features to implement.
Nvm I've actually now looked into it and I already had implemented this, I just forgot about it lol.
I tried to reproduce the bug but failed: the ref gets recognized successfully and everything is linked successfully.
Make sure you're using the latest release of Zine and then please commit a full repro in a branch for me to take a look at. What's almost certainly happening is that the footnote is placed in a location of the markdown AST where I forgot to properly record seen IDs.
I'm trying to implement footnotes. Here's my footnote, this would go inline in a paragraph:
Later in the text, I'd have the content for the footnote, as another link:
However, I get an error saying that "1" is an invalid ref. If I change the second snippet to be a heading instead of a link, then it works as expected.
[EDIT] Maybe ref thinks that only sections can be linked to? I can see why that would be reasonable in most cases, but in the case of footnotes this is a bit annoying because I don't want all my footnotes to show up in the table of contents.
The text was updated successfully, but these errors were encountered: