tdemin / gmnhg

Hugo-to-Gemini Markdown converter
GNU General Public License v3.0
29 stars 1 forks source link

Implement footnotes support #18

Closed tdemin closed 3 years ago

tdemin commented 3 years ago

This adds initial foonotes support, with rendering those as a list in the document end (which is how gomarkdown represents footnotes). The footnotes themselves aren't yet displayed in the document text.

Fixes #16.

tdemin commented 3 years ago

The easiest way to render footnote's text itself appears to be passing *ast.Link through the main type switch in (Renderer).RenderNode() and rendering its text from there...

tdemin commented 3 years ago

@mntn-xyz okay, looks like this is the best we can do before writing a generic link extractor:

Footnotes test