pulldown-cmark: Footnote definition does not end

extern crate pulldown_cmark as cmark;

use cmark::{Options, Parser};

fn main() {
    for e in Parser::new_ext("Hello, [^goo]\n\n\
                              [^goo]: world.\n\n\
                              Follow [link][ref]",
                             Options::all()) {
        println!("{:?}", e);
    }
}

The above code outputs (footnote definition extending until the end):

Start(Paragraph)
Text("Hello, ")
FootnoteReference("goo")
End(Paragraph)
Start(FootnoteDefinition("goo"))
Start(Paragraph)
Text("world.")
End(Paragraph)
Start(Paragraph)
Text("Follow ")
Text("[link]")
Text("[ref]")
End(Paragraph)
End(FootnoteDefinition("goo"))

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Reactions: 1
  • Comments: 18 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Note for folks following this thread: I am (albeit very slowly) working my way toward a solution to alllll the footnote issues over on #544. Honestly, it’ll likely be the end of the year before I have something working (at earliest!) but I really, really want “standard” footnotes to just work in pulldown-cmark, so I’m going to keep pushing on it, however slowly.

@ScottAbbey You’re right, that’s indeed an inconsistency. I’ll update the proposal soon.

UPDATE: Updated