quarto_format

Notedocblock
quarto_format(m::Markdown.Code, eval = false)

Format a block of markdown code to Quarto.

Code blocks with language "jldoctest" or "" are rendered as julia blocks. When eval is false (the default) the block is a plain fenced block (not executed by Quarto); when true it is a Quarto executable {julia} block.

Arguments

  • m::Markdown.Code: a block of Markdown.Code.
  • eval: if false, the resulting block is not going to be evaluated.

Notedocblock
quarto_format(m)

Return a plain text representation of m via Markdown.plain.

This is the generic fallback used for any node type without a more specific method (lists, tables, block quotes, horizontal rules, …). Markdown.plain preserves inline math (\(`x`\) becomes $x$) and display math.


Notedocblock
quarto_format(m::Markdown.Paragraph)

Return a plain text of m and a line break.


Notedocblock
quarto_format(m::AbstractString)

Returns m.


Notedocblock
quarto_format(m::Markdown.Header)

Render a Markdown header, demoting its level by two (H1 -> H3, H2 -> H4, H3 -> H5, H4 and deeper are capped at H6). Demotion keeps docstring headers below the page H1 title and out of the page-level table of contents.


Notedocblock
quarto_format(md::Markdown.MD)

Given a markdown block, flatten its (possibly nested) content, apply quarto_format to each leaf node, and concatenate the resulting strings.


Notedocblock
quarto_format(md::Markdown.Admonition)

Format a Markdown.Admonition into a Quarto callout block, mapping the Julia admonition category to the appropriate callout class:

  • note/info/compat -> callout-note
  • warning -> callout-warning
  • tip -> callout-tip
  • danger -> callout-important
  • any other (unknown) category -> callout-note The callout title is the admonition’s own title. The title attribute is omitted when the title is empty or simply the capitalized category default (e.g. category note with title "Note").