Skip to content

Fix footnote definitions absorbing subsequent document content#524

Open
maennchen wants to merge 1 commit into
pragdave:masterfrom
maennchen:jm/footnote-parsing
Open

Fix footnote definitions absorbing subsequent document content#524
maennchen wants to merge 1 commit into
pragdave:masterfrom
maennchen:jm/footnote-parsing

Conversation

@maennchen
Copy link
Copy Markdown

Footnote definitions were terminating the main parse loop and feeding all remaining lines into the footnote body collector, causing content after a footnote definition to be nested inside its li node. The div.footnotes block was also placed at the position of the first footnote rather than at the end of the document.

Rewrite FootnoteParser to partition lines into per-footnote bodies (blank/indented continuations) and regular document lines, parse each separately, and append FnList at the end of the document.

Footnote definitions were terminating the main parse loop and feeding all
remaining lines into the footnote body collector, causing content after a
footnote definition to be nested inside its `li` node. The `div.footnotes`
block was also placed at the position of the first footnote rather than at
the end of the document.

Rewrite `FootnoteParser` to partition lines into per-footnote bodies
(blank/indented continuations) and regular document lines, parse each
separately, and append `FnList` at the end of the document.
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