A monad for accumulating footnotes while rendering Markdown. Footnote labels are paired with their
already-rendered bodies, in order of first reference. MarkdownM.run' flushes them at the end of
the document.
Instances For
Tracks which inline delimiters are already open so that nested * / ** / […](…) don't emit
redundant openers and closers.
- inEmph : Bool
The current code is inside emphasis (
*…*). - inBold : Bool
The current code is inside strong emphasis (
**…**). - inLink : Bool
The current code is inside a link's display text.
Instances For
Concatenates a array of lines, where each line is an array of rendered inlines. The last line of one
piece is glued onto the first line of the next via glueInlineBoundary (so .text "a" followed by
.text "b" yields one line "ab", but two adjacent .code spans get a U+200B between them).
Instances For
A way to transform block elements extended with b (containing inline elements
extended with i) into Markdown lines.
- toMarkdown : (Inline i → MarkdownM (Array String)) → (Block i b → MarkdownM (Array String)) → b → Array (Block i b) → MarkdownM (Array String)
Render the
band its contents to Markdown lines, given recursive renderers for inline and block content.
Instances
Renders a Part (a logical document section) at the given heading level. Headings use ATX-style
(#, ##, …) with level 0 rendering as #.