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

various fixes for footnotes #57

Open
wants to merge 5 commits into
base: gfm
Choose a base branch
from

Conversation

QuietMisdreavus
Copy link

This PR adds a handful of fixes and improvements surrounding footnotes:

  • Footnote definition and reference nodes now properly report a node type in cmark_node_get_type_string.
  • XML output now emits the footnote IDs for footnote definitions and references.
  • The "literal" string for footnote definitions (which holds the ID for the footnote) is now cached after the length adjustment that trims the trailing ]: from the text, allowing cmark_chunk_to_cstr to be called on these literals correctly.
  • A new API, cmark_node_get_footnote_id has been added which returns the footnote ID for footnote definition and reference nodes. This can be used to easily load the authored footnote ID so that they can be matched with each other.

These changes are necessary for adding footnote support to Swift-Markdown and Swift-DocC.

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