Skip to content

markdown-quote

Handles blockquotes, including nested blockquotes with full inner markdown support.

Details

PropertyValue
Namemarkdown-quote
Priority100
TypeBlock
FactorymarkdownQuote()

What It Handles

Blockquotes

Lines starting with > followed by a space:

markdown
> This is a blockquote.
> It can span multiple lines.

Renders as:

html
<blockquote>
  <p>This is a blockquote. It can span multiple lines.</p>
</blockquote>

Nested Blockquotes

Multiple > characters create nested quotes:

markdown
> Outer quote
>> Inner quote
>>> Deeply nested

Renders as nested <blockquote> elements:

html
<blockquote>
  <p>Outer quote</p>
  <blockquote>
    <p>Inner quote</p>
    <blockquote>
      <p>Deeply nested</p>
    </blockquote>
  </blockquote>
</blockquote>

Inner Markdown

Content inside blockquotes supports full markdown formatting:

markdown
> # Heading in a quote
> This is **bold** and *italic*.
> - List item one
> - List item two

Continuation Lines

A line without > can continue a previous blockquote in certain contexts (lazy continuation):

markdown
> Start of the quote
continues here without >

API

ts
import { markdownQuote } from '@generative-dom/plugins';

const plugin = markdownQuote();

No configuration options.

Edge Cases

  • > without a space after it still starts a blockquote (the space is optional but recommended)
  • Empty blockquote lines (> alone on a line) separate paragraphs within the quote
  • Blockquotes can contain code blocks, lists, and headings
  • Deeply nested quotes (5+ levels) render correctly but may be visually cramped
  • Stream splits mid-quote (e.g., > at end of chunk, content in next chunk) are handled by the buffer

Rendering

InputOutput Element
> text<blockquote> containing parsed inner content
>> textNested <blockquote> elements

Inner content is recursively parsed, so blockquotes can contain any block-level or inline-level syntax that other registered plugins handle.