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

Footnote backrefs #15

Closed
bjhess opened this issue Dec 18, 2024 · 4 comments
Closed

Footnote backrefs #15

bjhess opened this issue Dec 18, 2024 · 4 comments

Comments

@bjhess
Copy link

bjhess commented Dec 18, 2024

In Buttondown I see a footnote resolved with a backref link. See here:

CleanShot 2024-12-18 at 10 57 15@2x

In my usage the footnote doesn't render with a backref. I end up with something like:

<li id="fn:1" data-id="0e1717e6-e02b-4303-b9cd-222f722be1f8">
  <p>Footnotes</p>
</li>

Without the backref link that I see on Buttondown:

<a class="footnote-backref" href="#fnref:1"></a>

I don't find any instances of backref in the repo, so I'm wondering if you're extending the extension in Buttondown to achieve this?

Copy link

linear bot commented Dec 18, 2024

OSS-6 Footnote backrefs

@jmduke
Copy link
Member

jmduke commented Dec 19, 2024

Yup; that's being added what we're actually using on the backend to render the final HTML spat out by Tiptap (since we need to be able to render tiptap and 'plain' Markdown to the same final artifact), which is the python-markdown extension.

@jmduke jmduke closed this as completed Dec 19, 2024
@jmduke jmduke reopened this Dec 19, 2024
@jmduke
Copy link
Member

jmduke commented Dec 19, 2024

In terms of extending the extension to achieve this — I am not sure we want to be so heavily prescriptive as to default to adding the backref, but I think we could absolutely expose a hook to allow overriding the render (which would also solve #11).

@bjhess
Copy link
Author

bjhess commented Dec 19, 2024

That makes sense, @jmduke. Thanks for sharing what y'all are doing. Just added render-time backref processing to Pika. Thanks!

(I'm assuming this issue can be closed, but I'll leave that up to you!)

@jmduke jmduke closed this as completed Dec 19, 2024
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