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

handle case where link text contains a footnote #98

Closed
3 tasks done
yshavit opened this issue Jul 6, 2024 · 4 comments · Fixed by #189
Closed
3 tasks done

handle case where link text contains a footnote #98

yshavit opened this issue Jul 6, 2024 · 4 comments · Fixed by #189
Labels
bug Something isn't working
Milestone

Comments

@yshavit
Copy link
Owner

yshavit commented Jul 6, 2024

link text can't contain a link (by definition), but it could contain a footnote.

I should check for that. I bet it's wrong right now.

  • check for md output
  • check for json output
  • check for footnotes that contain other footnotes
@yshavit yshavit added the bug Something isn't working label Jul 6, 2024
@yshavit yshavit added this to the 1.0 milestone Jul 24, 2024
@yshavit yshavit changed the title handle case where inline text contains a footnote handle case where link text contains a footnote Aug 25, 2024
@yshavit
Copy link
Owner Author

yshavit commented Aug 25, 2024

- AAA: [footnote [^1] in a link](https://example.com)
- BBB: footnote countains foonote[^2]
- CCC: footnote contains link[^3]

[^1]: the link's footnote text
[^2]: this footnote contains[^a] a footnote
[^3]: this footnote contains a [link][3a]
[^a]: this is the footnote's footnote

[3a]: https://example.com/3a

  • AAA: footnote 1 in a link
  • BBB: footnote countains foonote2
  • CCC: footnote contains link3

Footnotes

  1. the link's footnote text

  2. this footnote contains4 a footnote

  3. this footnote contains a link

  4. this is the footnote's footnote

@yshavit
Copy link
Owner Author

yshavit commented Aug 26, 2024

Oh actually, footnotes-within-links don't work. I just hadn't noticed that it's rendered wrong, but it is.

mdast handles these the same as GH does: see https://gist.github.com/yshavit/6af0a784e338dc32e66717aa6f495ffe

@yshavit
Copy link
Owner Author

yshavit commented Aug 26, 2024

Can you also have footnotes that reference themselves? 1

Footnotes

  1. let's see if you can1 2

@yshavit
Copy link
Owner Author

yshavit commented Aug 26, 2024

(answer: kinda, but GitHub gets confused!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant