@generative-dom/plugin-markdown-inline
v0.1.0
Published
Generative DOM plugin — bold, italic, strikethrough, and inline code
Maintainers
Readme
@generative-dom/plugin-markdown-inline
Inline text formatting: bold, italic, bold-italic, strikethrough, and inline code.
Installation
pnpm add @generative-dom/plugin-markdown-inlineUsage
import { GenerativeDom } from '@generative-dom/core';
import { markdownBase } from '@generative-dom/plugin-markdown-base';
import { markdownInline } from '@generative-dom/plugin-markdown-inline';
const md = new GenerativeDom(container, { plugins: [markdownBase(), markdownInline()] });
md.push('**bold** and _italic_\n');Matching
This is an inline-only plugin. It runs inside block elements (paragraphs, headings, etc.) that permit inline children.
| Syntax | Meaning |
|--------|---------|
| `code` or ``code`` | Inline code (no further parsing) |
| ***text*** | Bold-italic |
| **text** or __text__ | Bold |
| *text* or _text_ | Italic |
| ~~text~~ | Strikethrough |
Inline code is matched before bold/italic so that backtick content is never formatted.
Configuration
- priority: 200
- level:
inline - matchDescriptor: none
Rendered Output
| Token type | Element |
|------------|---------|
| inline code | <code> (plain text content) |
| bold | <strong> |
| italic | <em> |
| bold-italic | <strong><em> |
| strikethrough | <del> |
