orgize
orgize copied to clipboard
feat: adds footnote support
Syntax
- added node:
FN_CONTENT - added token:
FN_LABEL - updated
fn_def()andfn_ref()to use the two new syntax kinds- re-labelled
fntext as keyword
- re-labelled
To-do
- prune unneeded generator functions
AST
- added
FnContentas new AST node - added extractors to
FnDef,FnReffor label and content
Parsing (HTML)
- added
Eventhandlers-
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