erusev / parsedown-extra

Markdown Extra Extension for Parsedown

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Footnotes not generated if prefixed by a list

tomzx opened this issue · comments

Test case (markdown)

Test[^1]

* Some list

[^1]: Test

PHP Markdown Extra

<p>Test<sup id="fnref:1"><a class="footnote-ref" href="#fn:1">1</a></sup></p>
<ul>
    <li>Some list</li>
</ul>
<div class="footnotes">
    <hr>
    <ol>
        <li id="fn:1">
            <p>Test&#160;<a class="footnote-backref" href="#fnref:1" rev=
            "footnote">&#8617;</a></p>
        </li>
    </ol>
</div>

Parsedown Extra

<p>Test<a href="Test">^1</a></p>
<ul>
    <li>Some list</li>
</ul>

As one can see, in the case of Parsedown Extra, no footnote is generated, while it is expected that one would be.

Also with a extra page break after definition list title (work fine without extra page break).

Markdown

Test[^1]

Pomme

: Fruit du pommier

[^1]: Test

PHP Markdwon extra

<p>Test<sup id="fnref:1"><a href="#fn:1" class="footnote-ref">1</a></sup></p>

<dl>
    <dt>Pomme</dt>
    <dd>
        <p>Fruit du pommier</p>
    </dd>
</dl>

<div class="footnotes">
    <hr />
    <ol>
        <li id="fn:1">
            <p>Test&#160;<a href="#fnref:1" rev="footnote" class="footnote-backref">&#8617;</a></p>
        </li>
    </ol>
</div>

Parsedown Extra

<p>Test<sup id="fnref1:1"><a href="#fn:1" class="footnote-ref">1</a></sup></p>
<dl>
    <dt>Pomme</dt>
    <dd><p>Fruit du pommier</p></dd>
</dl>

A second intended paragraph is a "footnote killer", too. See sample.


This is a simple text with some footnotes[^1] to show what happens if you use *well formated* definitions..

[^1]: This is shown if you take this sample as it is.

Footnotes[^2] got lost depending on the way of writhing your markdown.

[^2]: Tiny texts at the bottom of a page.


List Header
: In this case, nothing happens.

See what happens if you indent this line to create a second paragraph indending to the definition.

Because I need footnotes regularly in my texts as well as definitions, this is currently a shoot out of using this parser.

Note: The current beta of Caret behaves differently: There the formatting of definitions is generally ignored, footnotes always appear. I paid for Caret, but I can't use it therefore neither the beta nor in the paid one for the planned tasks.

This issue is pending 17 month now.

Not sure if this helps with parsedown, I'm using Caret and pandoc. If you indent the definition continuation using four spaces, it gets correctly recognized as continuation of the definition, and doesn't kill the footnotes.

commented

This issue does affect PicoCMS, too. It would be nice to fix it. Thanks!

Has the problem been settled till now? It still recognized my footnote as a link.