Skip to content

Add footnotes. #228

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add footnotes. #228

wants to merge 1 commit into from

Conversation

jbeder
Copy link

@jbeder jbeder commented May 8, 2025

This relies on the footnote extension in cmark, which does not expose footnote type names, but does expose enough information via the type enum.

Bug/issue #, if applicable:

Summary

Adds new footnote types FootnoteDefinition and FootnoteReference to the markdown tree.

Dependencies

None. It would be nice to use swiftlang/swift-cmark#57, but it's not necessary; there's a small hack that can reliably detect when cmake produces footnotes.

This is heavily based on #129, which also adds footnote support; however, that PR does rely on the upstream swift-cmark PR, whereas this one does not.

Testing

New test introduced to verify the parsing of footnotes, which pass with ./bin/test.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

This relies on the footnote extension in cmark, which does not expose footnote type names, but does expose enough information via the type enum.
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

Successfully merging this pull request may close these issues.

1 participant