Skip to content

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