Skip to main content

Curly braces are reserved for attribute syntax

markdown
A curly-brace run in body text is not valid attribute syntax; literal braces must be escaped.

Q-2-41 — Curly braces are reserved for attribute syntax

Curly braces are reserved for attribute syntax in Quarto markdown. To write literal braces, escape them as \{...\}. If you meant to attach an attribute, use .class / #id / key="value" syntax, e.g. [text]{.class}.

What this means

Quarto markdown reserves curly braces for attribute syntax — the {.class}, {#id}, and {key="value"} annotations that attach attributes to spans, links, images, and code blocks. A brace run in body text that is not valid attribute syntax, such as

the request returns the task {guid} immediately.

is a parse error, not literal text. Pandoc and Quarto 1 render brace runs like this as literal text, so this error commonly appears when porting existing documents.

Why this happens

  • Literal braces in prose. The most common source is text that uses braces as placeholders — REST API documentation writes path parameters like /v1/content/{guid}/bundles constantly.
  • Braces inside link text. The same reservation applies inside link text: [the {guid} link](https://example.com) fails the same way.
  • Malformed attribute syntax. Writing [text]{guid} when you meant [text]{.guid} (a class) or [text]{#guid} (an id) lands in the same error, because a bare word is not valid attribute syntax.

How to fix

If you want literal braces in the output, escape both braces with backslashes:

the request returns the task \{guid\} immediately.

This renders as the request returns the task {guid} immediately. — and Pandoc renders the identical escaped source the same way, so the escaped form stays portable.

If you meant to attach an attribute, use attribute syntax: a class ([text]{.myclass}), an id ([text]{#myid}), or a key-value pair ([text]{key="value"}).

Example

Bad input:

the request returns the task {guid} immediately.

Corrected (literal braces):

the request returns the task \{guid\} immediately.

Corrected (attribute intended):

the request returns [the task]{#task-guid} immediately.