## Footnotes TODO: proper spec. This test is based on the one from gfm. ```````````````````````````````` example This is some text![^1]. Other text.[^footnote]. Here's a thing[^other-note]. And another thing[^codeblock-note]. This doesn't have a referent[^nope]. [^1]: Some *bolded* footnote definition. [^footnote]: > Blockquotes can be in a footnote. as well as code blocks or, naturally, simple paragraphs. [^other-note]: no code block here (spaces are stripped away) [^codeblock-note]: this is now a code block (8 spaces indentation) Hi! [^unused]: This is unused. .

This is some text!1. Other text.2.

Here's a thing3.

And another thing4.

This doesn't have a referent[^nope].

Hi!

1

Some bolded footnote definition.

2

Blockquotes can be in a footnote.

as well as code blocks

or, naturally, simple paragraphs.

3
   no code block here (spaces are stripped away)
4
this is now a code block (8 spaces indentation)
5

This is unused.

```````````````````````````````` Ensure that nested blocks in footnotes are rendered in the right order (#63). ```````````````````````````````` example Hello[^test] Footnote containing a list[^list] [^test]: > first > > second > > third [^list]: 1. First element 1. Second element .

Hello1

Footnote containing a list2

1

first

second

third

2
  1. First element
  2. Second element
```````````````````````````````` Footnote labels cannot be empty, or composed only of whitespace. ```````````````````````````````` example Test [^] link [^ ] [^]: https://haskell.org .

Test ^ link ^

```````````````````````````````` ```````````````````````````````` example [^]: not a footnote [^ ]: not a footnote [^ ]: not a footnote .

[^]: not a footnote

[^ ]: not a footnote

[^ ]: not a footnote

```````````````````````````````` Footnote labels cannot contain line breaks, even where link labels can. ```````````````````````````````` example [^foo\ bar]: not a footnote definition [baz\ quux]: https://haskell.org [first second]: https://haskell.org [^third fourth]: not a footnote definition [baz\ quux] [^foo\ bar] [first second] [^third fourth] .

[^foo
bar]: not a footnote definition

[^third fourth]: not a footnote definition

baz
quux
[^foo
bar] first second [^third fourth]

```````````````````````````````` Paragraphs in footnotes can be lazily wrapped (#126). ```````````````````````````````` example [^foo]:bar baz [^foo] .

1

1

bar baz

````````````````````````````````