Pandoc Sidenote Test
A paragraph with a simple inline footnote.This is a simple inline note with just text and a link.1 You are right.
A sidenote with bold text, italic,
inline code, and a list:
- First item
- Second item
- Third item with emphasis
And a second paragraph inside the same note.
Here is a code snippet in a sidenote:
main :: IO ()
main = putStrLn "Hello, world!"This code works with GHC 9.4+.
Rich sidenote with multiple elements:
- Ordered list item 1
- Ordered list item 2
A second paragraph.
Inline notes (^[…])
Test cases for the inline_notes extension. Each case is
labelled so the rendered result can be matched back to its source. All
notes here are written as ^[…] (inline notes), not
[^n] (regular footnotes) — unless the case says
otherwise.
Case 1 — a simple inline note. A sentence with a plain inline note.This is a plain inline note.6 The sentence continues after it.
Case 2 — numbering when inline and regular notes are mixed. First a regular footnote.A regular footnote that comes first in reading order.7 Then an inline note.An inline note in the middle.8 Then another regular footnote.A regular footnote that comes last in reading order.9 Watch the numbering: is it one series, and in what order?
Case 3 — two inline notes in one sentence. Onethe first inline note10 and twothe second inline note11 in the same paragraph.
Case 4 — rich content inside an inline note. An
inline note containing bold, italic,
inline code, and a link.Here
is bold, italic, inline code, and
a link inside an inline
note.12
Case 5 — a list inside an inline note. Pandoc documents that inline notes cannot contain multiple paragraphs; a list is not a paragraph, so watch what happens to it.Note text: - First item - Second item13
Case 6 — an inline note inside emphasis. Regression test for the nested-container fix: this used to leak out as a real end-of-document footnote instead of becoming a sidenote. Emphasised texta note inside emphasis14 and more emphasised text.
Case 7 — ^[…] immediately followed by
(. The Pandoc reader treats this as a
superscripted link, not a note: ^not a
note
Case 8 — an unclosed ^[. This paragraph
has an unclosed ^[ bracket and should render verbatim.
Case 9 — ^[ inside a code span. This
must stay literal:
^[inside a code span, must not become a note]
Case 10 — ^[ inside a fenced code
block. This must stay literal too:
^[inside a fenced code block, must not become a note]Case 11 — an escaped \^[. This must
stay literal as well: an escaped ^[not a note] sequence.