Skip to content

Incoherent footnote content wrapping? #14

@vhf

Description

@vhf

I think I found a bug but I was unable to track it down.

Input markdown:

1 [^alpha bravo]

2 [^foo]

[^foo]: foobar

Then using

// remark-parse with config:
{
  gfm: true,
  commonmark: false,
  footnotes: true
}
// then into 'remark-rehype'
// finally into 'rehype-stringify'

I get the following:

 <p>1 <sup id="fnref-1"><a href="#fn-1" class="footnote-ref">1</a></sup></p>
 <p>2 <sup id="fnref-foo"><a href="#fn-foo" class="footnote-ref">foo</a></sup></p>
 <div class="footnotes">
 <hr>
 <ol>
-<li id="fn-foo">
-<p>foobar</p>
 <a href="#fnref-foo" class="footnote-backref">↩</a>
 </li>
+<li id="fn-1">
+alpha bravo
 <a href="#fnref-1" class="footnote-backref">↩</a>
 </li>
 </ol>
 </div>

Highlighted is what might be considered a bug: foobar is wrapped in p, alpha bravo isn't.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions