fletcher / peg-multimarkdown

An implementation of MultiMarkdown in C, using a PEG grammar - a fork of jgm's peg-markdown. No longer under active development - see MMD 5.
Other
523 stars 55 forks source link

adjacent consecutive footnotes are mis-parsed #120

Closed abartov closed 12 years ago

abartov commented 12 years ago

Input:

abc def [^f1] ghi [^f2][^f3] lklk jkl

[^f1]: first footnote text [^f2]: second footnote text [^f3]: third footnote text

Output:

abc def [1] ghi [^f2][^f3] lklk jkl


  1. first footnote text [^f2]: second footnote text [^f3]: third footnote text  ↩

fletcher commented 12 years ago

You need to insert a blank line between paragraphs. Since footnotes can contain multiple lines (e.g. they are paragraphs), you need a blank line to indicate that the footnote is finished, e.g.:

abc
def [^f1]
ghi [^f2][^f3] lklk
jkl

[^f1]: first footnote text

[^f2]: second footnote text

[^f3]: third footnote text
abartov commented 12 years ago

Of course! Silly me. Sorry to have missed that.