tdemin / gmnhg

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

Links are stripped from footnotes #23

Closed mntn-xyz closed 3 years ago

mntn-xyz commented 3 years ago

Original 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.

[^1]: Example footnote
[^2]: Example footnote with link to example.com
[^3]: example.com

Note that the links in the footnotes are completely lost. I guess it would make sense to put the link right after the footnote, like this:

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 example.com

[^3]: example.com

=> https://example.com example.com
tdemin commented 3 years ago

They are, and I am currently tackling this along with #17 by writing a generic link extractor.