Skip to main content

Listing Markdown Re-parse Diagnostics

listing
Re-parsing the markdown produced by the listing template surfaced one or more diagnostics.

Q-12-10 — Listing Markdown Re-parse Diagnostics

Re-parsing the markdown produced by the listing template surfaced one or more diagnostics.

What this means

A listing renders in two steps. First, Quarto runs the listing template (a built-in or a custom doctemplate) over the listing’s items and produces a string of markdown. Then it parses that markdown back into an AST so the result can be spliced into the host document.

If the second parse surfaces diagnostics, this diagnostic fires. The message includes how many diagnostics the re-parse produced and the title of the first one, so you can find the underlying issue.

  • When the re-parse succeeds with diagnostics (for example, raw HTML written by a custom template), it is a warning and the listing renders.
  • When the re-parse fails, the listing is skipped and it is an error: a page that silently ships without its listing is easy to miss.

Why this happens

Item metadata does not cause it: a listing writes each item’s title, subtitle and description back as markdown, with their formatting kept and any markdown-significant text escaped. A title such as Fix \_scope or About `<anonymous>` frames renders in the listing as it does on its own page.

The usual trigger is a custom template that produces syntactically invalid output: an unterminated fence, an unclosed _ or * in the template’s own text, or a $variable$ interpolated where markdown does not expect it.

How to fix

Inspect the first diagnostic the message mentions. Its error code (Q-2-*) and message point at what the re-parser found broken. Then trace it back to the custom template.