yogthos / markdown-clj

Markdown parser in Clojure
Eclipse Public License 1.0
540 stars 120 forks source link

Allow `:` char in footnote links #185

Closed vedang closed 2 years ago

vedang commented 2 years ago

org-mode uses footnotes of the style [fn:1] both at the point in the text where a footnote is linked as well as at the bottom of the text where the footnote is defined[^1].

When these are exported to markdown, they become [^fn:1] at the point in text where the footnote is linked and [^fn:1]: at the bottom of the text where the footnote is defined.

The presence of the : in the name of the footnote is not currently handled by markdown-clj, and due to this these footnotes are not converted correctly.

This PR fixes the regex to allow : in the footnote name.

[^1]: See https://orgmode.org/manual/Creating-Footnotes.html

Testing: