The monad in which docstring Markdown is rendered. This is used when showing Verso docstrings as plain Markdown, such as in the language server.
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
Equations
Renders an action that produces an array of lines into a single Markdown string, appending any accumulated footnotes after the main body.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Applies a uniform prefix to every line. Empty lines receive the trimmed prefix to avoid trailing whitespace (which denotes a hard line break).
Equations
Instances For
Applies one prefix to the first line and a different prefix to subsequent lines. Used for list items,
where the first line gets "* " / "1. " and the continuation lines get " " / " ".
Equations
- One or more equations did not get rendered due to their size.
Instances For
Concatenates an array of "block" line arrays into one line array, with a single empty separator line between adjacent non-empty blocks. Empty input blocks are skipped.
Equations
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).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
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
Equations
- One or more equations did not get rendered due to their size.
Equations
Renders a Part (a logical document section) at the given heading level. Headings use ATX-style
(#, ##, …) with level 0 rendering as #.
Equations
- Lean.Doc.instToMarkdownPartOfMarkdownInlineOfMarkdownBlock = { toMarkdown := fun (part : Lean.Doc.Part i b p) => Lean.Doc.partMarkdown 0 part }
A renderer for custom inline elements of type α. It receives a renderer for inline content, the
custom element, and the element's fallback content.
Equations
Instances For
A renderer for custom block elements of type α. It receives renderers for inline and block
content, the custom element, and the element's fallback content.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Renders a custom inline element to Markdown. It receives a renderer for inline content, the saved
Dynamic description of the custom element, and the element's fallback content.
Instances For
Renders a custom block element to Markdown. It receives renderers for inline and block content, the
saved Dynamic description of the custom element, and the element's fallback content.
Instances For
Wraps a typed inline renderer as an InlineMdRenderer by decoding the Dynamic custom element as
α.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Wraps a typed block renderer as a BlockMdRenderer by decoding the Dynamic custom element as α.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Registry for custom inline element renderers that maps element type names to renderer names.
Registry for custom block element renderers that maps element type names to renderer names.
Registers a builtin inline Markdown renderer.
Equations
- Lean.Doc.addBuiltinInlineMdRenderer type r = ST.Ref.modify Lean.Doc.builtinInlineMdRenderers✝ fun (x : Lean.NameMap Lean.Doc.InlineMdRenderer) => x.insert type r
Instances For
Registers a builtin block Markdown renderer.
Equations
- Lean.Doc.addBuiltinBlockMdRenderer type r = ST.Ref.modify Lean.Doc.builtinBlockMdRenderers✝ fun (x : Lean.NameMap Lean.Doc.BlockMdRenderer) => x.insert type r
Instances For
Looks up the inline Markdown renderer registered for typeName, if any.
Looks up the block Markdown renderer registered for typeName, if any.
A small, fixed heartbeat budget applied afresh to each custom element renderer.
Docstrings are rendered constantly (e.g. on every hover), and renderers may run arbitrary MetaM,
so this bounds the work any single element can impose.
Equations
- Lean.Doc.mdRendererHeartbeats = 200000
Instances For
Runs an element renderer with a fresh mdRendererHeartbeats budget.
The budget applies to each renderer separately.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runs a renderer with a fallback.
If the renderer fails or exceeds its heartbeat budget, then the fallback content is rendered instead.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Runs a Markdown-rendering action against an environment, building a minimal CoreM context.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Finds a docstring without performing any alias resolution or enrichment with extra metadata. The result is rendered as Markdown.
Docstrings to be shown to a user should be looked up with Lean.findDocString? instead.
Equations
- One or more equations did not get rendered due to their size.