@generative-dom/plugin-markdown-quote
v0.1.0
Published
Generative DOM plugin — blockquotes
Maintainers
Readme
@generative-dom/plugin-markdown-quote
Blockquotes with support for nested levels for Generative DOM.
Installation
pnpm add @generative-dom/plugin-markdown-quoteUsage
import { GenerativeDom } from '@generative-dom/core';
import { markdownBase } from '@generative-dom/plugin-markdown-base';
import { markdownQuote } from '@generative-dom/plugin-markdown-quote';
const md = new GenerativeDom(container, { plugins: [markdownBase(), markdownQuote()] });
md.push('> A quoted paragraph\n');Matching
Matches one or more consecutive lines that start with >. The depth is determined by
the number of leading > characters on the first line. A blank line or a line that does
not start with > terminates the block.
> Single-level quote
>> Double-nested quote
> Multi-line
> blockquoteAn optional space after each > marker is stripped from the inner content.
Configuration
- priority: 100
- level: block (default)
- matchDescriptor:
{ startChars: '>', requiresSOL: true }
Rendered Output
Produces nested <blockquote> elements according to depth. Inner content is rendered
via inline parsing.
<!-- depth 1 -->
<blockquote>quoted text</blockquote>
<!-- depth 2 -->
<blockquote><blockquote>nested text</blockquote></blockquote>