parsedown-extra icon indicating copy to clipboard operation
parsedown-extra copied to clipboard

Footnotes not generated if prefixed by a list

Open tomzx opened this issue 9 years ago • 5 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.

tomzx avatar Feb 24 '16 01:02 tomzx

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>

ziopod avatar Apr 08 '16 16:04 ziopod

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.

BsNoSi avatar Aug 07 '18 05:08 BsNoSi

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.

psoukie avatar Sep 05 '18 19:09 psoukie

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

mo8it avatar Dec 29 '20 21:12 mo8it

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

martinSCS avatar Nov 05 '23 06:11 martinSCS