erusev / parsedown-extra

Markdown Extra Extension for Parsedown
MIT License
820 stars 123 forks source link

Footnotes not generated if prefixed by a list #87

Open tomzx opened 8 years ago

tomzx commented 8 years ago

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.

ziopod commented 8 years ago

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>
BsNoSi commented 6 years ago

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.

psoukie commented 6 years ago

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.

mo8it commented 3 years ago

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

martinSCS commented 1 year ago

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