Problem with footnotes
Closed this issue · 2 comments
Not sure what's happening here, will take a look when I have some time.
Markdown:
Itatur? Quiatae cullecum[^1] rem ent aut odis in re eossequodi nonsequ idebis ne sapicia[^2] is sinveli squiatum, core et que aut hariosam[^3] ex eat.
[^1]: Example footnote
[^2]: Example footnote with link to [example.com](https://example.com)
[^3]: [example.com](https://example.com)
Output:
Itatur? Quiatae cullecum[^1] rem ent aut odis in re eossequodi nonsequ idebis ne sapicia[^2] is sinveli squiatum, core et que aut hariosam^3 ex eat.
=> [example.com](https://example.com) ^3
[^1]: Example footnote [^2]: Example footnote with link to example.com
=> https://example.com example.com
Affects me as well; right now one of the posts (gemini://tdem.in/post/pgp-alternatives.gmi
) of mine has got its footnotes flattened in a single line.
Looking into it, gomarkdown won't respect footnotes by default, treating them as ordinary text. Enabling those in renderer flags (|parser.Footnotes
in parser extensions specification) will emit an *ast.List
in the end of the AST, containing all the foonotes as list items (which aren't *ast.Paragraph
-s). The footnotes themselves are *ast.Link
-s inside the document with the Footnote
property linking (?) to something.
Looks like it's time to rework the renderer so it can extract links from wherever it needs, and not just paragraphs...