Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

7.0 KB
Raw Blame

Quarto export no longer promotes a fenced cell in report prose to an executable cell. A ```{python} fence is inert text in a markdown report and a cell that quarto render runs in a .qmd, and report bodies carry web-influenced content, so the braces are now dropped and the code is exported as the display fence it was (#6470).

Quarto export also no longer lets report text pull in another file or print the renderer's environment variables when the exported .qmd is rendered on its own (see the residual risks below), and it now turns every code-cell header in a report into a plain code fence wherever it appears: inside another code block, in a blockquote, with any whitespace or byte-order mark around the fence, or split across a line break.

The exported .qmd now sets from: markdown-raw_html-raw_tex-raw_attribute-native_divs-native_spans-fenced_divs-bracketed_spans-header_attributes-link_attributes-inline_code_attributes-fenced_code_attributes-yaml_metadata_block-pandoc_title_block in its front matter. Quarto hands this reader format to its own .qmd reader, which it also uses to read attribute text such as a callout title again as a document, so report text can no longer produce an attribute, a raw HTML or LaTeX block or inline, a raw {=format} block, a Div or Span, or Pandoc metadata. That switches off the routes by which Quarto (v1.10.18) decodes text into further shortcodes: attribute values (including a callout title or a caption read again as a document), qmd and qmd-base64 attributes, the pandoc-native, pandoc-json and pandoc-reader-* raw formats, \QuartoMarkdownBase64{} in raw LaTeX, and raw HTML. This has a rendering cost. Raw HTML in a report (such as <br> or <sup>) and raw LaTeX are shown as text instead of being rendered. Attribute blocks are shown as written: {#id .class} after a heading, link, image or inline code, [text]{...} spans and ::: divs. A code fence with an attribute block, such as ```{.python}, is no longer a code block; Pandoc reads it as inline code in a paragraph. The bibliography note is now a bold paragraph instead of a callout, because callouts are fenced divs.

The title is not read with that reader format: Quarto passes the front matter to Pandoc as a separate metadata file, and Pandoc parses it with all of its default markdown extensions because Quarto's reader is a Lua custom reader. The exporter therefore writes the title with a backslash before every ASCII punctuation character and with runs of spaces, tabs and line breaks collapsed to one space, so Pandoc reads it as plain text: raw HTML, a raw {=pandoc-native} inline, a [...]{qmd-base64=...} span or any other markup in the title is shown as written. The rendered title shows the same characters; Markdown formatting, entities and typographic quotes or dashes in it are no longer applied.

What still decodes report text is a fixed chain: Quarto's whole-file shortcode pass, Pandoc's single decoding of entities and backslash escapes, and Quarto's internal shortcode encodings. The exporter breaks every shortcode along that chain by inserting an invisible zero-width space, in the report, its title and its bibliography note:

  • the literal {{< and {{% openers, escaped forms included (such as {{< include >}}, {{< env >}} and {{< meta >}}), and two braces (with any backslashes between them) followed, after any whitespace or backslashes, by <, % or &;
  • an HTML entity that Pandoc would decode to {, -, _ or an ASCII letter or digit, and any &# reference other than a plain decimal or hex one of up to 8 digits;
  • Quarto's two internal shortcode encodings, which a sweep of quarto-cli v1.10.18 finds to be the only ones (the b58fc729-690b-4000-b19f-365a4093b2ff hex marker and the cf5733e5-0370-4aae-8689-61bad1dd9ec0 unicode escape), and the quarto-shortcode__ class.

Any other & is left alone. &amp;, &lt; and &nbsp; still render, and URLs with query strings (?q=a&hl=en), AT&T and &x in C code come through unchanged, so Sources links keep working. Math such as \frac{{\partial f}} is left alone. Every HTML comment opener in report text is broken the same way. The <!-- LDR_APPENDED_SOURCES_START --> marker that the report generator puts before its appended Sources section is removed from the exported body instead, so it does not show as text; a copy quoted elsewhere in the report is broken like any other comment. A fourth dash is added wherever three dashes end a line after nothing but whitespace, >, :, ~ or | prefix characters and footnote labels such as [^1]:, so Quarto finds no YAML block in the body; any other text before them leaves them alone, so prose ending in --- keeps its em dash and a URL ending in --- keeps its dashes. Pandoc reads no YAML block from the body at all, including one inside a grid-table cell: Quarto removes the front matter before Pandoc reads the file and passes the metadata separately, so the reader format switches Pandoc's YAML metadata blocks off, and its % title blocks too. So a report can no longer pull in another file, print the renderer's environment variables, or add YAML metadata such as an engine, filters or PDF engine options. Quarto therefore picks its markdown engine for the exported file, which runs no code cells and no inline r or {python} expressions.

Residual risks:

  • The protection holds for the file rendered as exported, against Quarto v1.10.18's readers as traced from source; no Quarto binary was run in testing. A future Quarto version that adds another decoder would need another look.
  • The exported file is meant to be rendered on its own. Quarto appends its own markup to the page before reading it with the same reader format: in a website, blog or book project, for a revealjs presentation, or with math: or keep-source set. That markup uses fenced divs, spans and code-block attributes, so it shows as text at the end of the page, and the page and site titles and descriptions it renders are lost. No reader format can keep Quarto's markup while dropping the same syntax from the report, because both are read in one pass.
  • An engine forced from outside the file, such as -M engine:knitr, would still evaluate inline expressions. A reader format set from outside that overrides the file's from would turn the switched-off readers back on.
  • A few Quarto filters read text with Pandoc's own reader, all extensions on, instead of the .qmd reader: a {...} ending a table caption, {#eq-...} after display math, and a ```quarto-title-block code fence (read as title-block metadata after shortcodes have run; without a template the render fails). In v1.10.18 none of these reaches a shortcode parser, but a table caption can still put attributes on the rendered table. A code fence's language also becomes a class, which some other Quarto filters act on when rendering; none of those found expands a shortcode.

A report that quotes the cell syntax as an example now shows it without its braces but keeps the rest of the line. A quoted shortcode, HTML comment or decodable entity keeps a zero-width space inside it.