Skip to content

Footnote nodes pushed to the end of Document's children #669

@mfontanini

Description

@mfontanini

Parsing the following markdown while enabling the footnotes options produces an AST where the footnote definition is placed at the end of the Document node's children list. This seems deliberate in comrak, I'm wondering why that's the case. I get it that footnote definitions should in general come at the end, but this has popped up in presenterm (see mfontanini/presenterm#766) where a markdown file contains presentation slides so footnotes may appear in any slides within a markdown file, not necessarily all packed at the end. Could this behavior at least be configurable so some option can be turned on such that footnote definitions nodes show up where they belong based on their position in the input?

A test[^1]

[^1]: https://example.com

Boop:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions