Skip to content

feat: adds footnote support #84

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 4 commits into
base: v0.10
Choose a base branch
from

Conversation

root-goblin
Copy link

Syntax

  • added node: FN_CONTENT
  • added token: FN_LABEL
  • updated fn_def() and fn_ref() to use the two new syntax kinds
    • re-labelled fn text as keyword

To-do

  • prune unneeded generator functions

AST

  • added FnContent as new AST node
  • added extractors to FnDef, FnRef for label and content

Parsing (HTML)

  • added Event handlers
    • Container:FnDef
    • Container::FnRef
    • Container::FnContent
    • FnLabel
Details

Separating out the label and the content allows extraction during HTML export. This data can then be used to generate a citations or footnotes section.

However as of right now, org-mode automatically generates org-footnotes-section when adding footnotes, so the default HTML export process works fine, but does not apply any special treatment to the Footnotes heading or section.

For future work, this would be wrapped in <aside></aside> or some other semantically significant tag.

Tests

  • updated insta snapshots to reflect new syntax
  • added tests/html.rs > footnote()

Docs

  • updated commands to be more portable

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