Skip to main content

Line Break Before Shortcode Close

markdown
A {{< … >}} shortcode contains a line break immediately before its closing >}}.

Q-2-27 — Line Break Before Shortcode Close

A {{< … >}} shortcode contains a line break immediately before its closing >}}.

What this means

Quarto shortcodes are single-line constructs. The closing >}} must appear on the same line as the rest of the shortcode body. This error fires when a newline sits between the last argument and the closing delimiter.

Why this happens

A long shortcode line that someone wrapped across multiple lines for readability, or a copy-paste that introduced a line break before the closer.

How to fix

Collapse the shortcode onto a single line:

{{< hello world >}}

If the content really needs to span multiple lines, use a different mechanism — shortcodes are not the right tool.

Example

{{< hello
>}}