Closed nonoesp closed 4 years ago
Hello !
That’s weird because I wrote a test case to check that order is preserve using footnotes references ordering.
https://github.com/rezozero/commonmark-ext-footnotes/blob/master/tests/Functional/data/regular.md
But I think this could come from the fact your using twice a footnote reference. I did not support that in the first place.
Could you try to remove the second [^nyt-200124]
reference and see if the order is preserved. If yes, this must be the main issue.
Ha! Interesting. Thanks for the swift reply.
That gets rid of the issue (as you can see on the image). (1) Haven't looked at the code, is support to multiple references to one footnote (e.g. [^nyt-200124]
) something you could add?
The only difference now is that michelf/php-markdown adds a space before the backref ↩. (2) Is that a standard you're following or is this something that we could change? The following animation shows the difference (the one with just one reference on the first footnote is with this extension).
Ok this should be fixed now.
Thanks so much, Ambroise.
Hey! First of all, Thanks so much for doing this. I've been waiting for this extension for a long time.
I'm using CommonMark but have to rely on michelf/php-markdown for posts with footnotes.
I just tested your extension and it works great.
I see a few differences on the output (in comparison with michelf/php-markdown) but the only one that bothered me was that footnotes don't show up ordered as they appear on the text, and that makes the numbering of the citation not match with the
<sup>
s in the text.Is this behavior intended, or something that you haven't got around implementing yet?
Anyway, this is super helpful.
Cheers, Nono
Here is a sample Markdown text and its corresponding footnotes as rendered by michelf/php-markdown and this CommonMark footnotes extension. Note that the "correct" order according to the appearances of the footnotes in the text is as rendered by michelf/php-markdown, as citation one matches item number one of the footnotes' list.
Markdown rendered as HTML
michelf/php-markdown
commonmark-ext-footnotes
Markdown