markdown-it / markdown-it-footnote

Footnotes plugin for markdown-it markdown parser
https://markdown-it.github.io/
MIT License
210 stars 59 forks source link

Add atDocumentEnd option #15

Closed fduch2k closed 8 years ago

fduch2k commented 8 years ago

Add option to allow insert footnotes not at the end of document but in place where footnote placed. By default old behavior kept (footnotes inserted at document end)

rlidwka commented 8 years ago

I don't think this addition is necessary.

We designed this plugin to follow PHP Markdown Extra and Pandoc. I don't see in-place footnotes in either one. And implementing something new here is just asking for trouble.

rlidwka commented 8 years ago

Also, there is a possible bug in implementation: footnotes are placed whenever the last footnote definition was, e.g.:

test [^1] [^2]

[^1]: foo

some text

[^2]: bar

some other text

is rendered into:

test [1] [2]

some text

{footnote block 1, 2}

some other text

but I'd expect to see this:

test [1] [2]

{footnote block 1}

some text

{footnote block 2}

some other text

... with multiple footnote blocks. But I think this would require large changes in the code base, that don't really worth it.