MarkdownHelpers
Type Stability: stable
Definition
TypeScript
import type { MarkdownHelpers } from '@aionbuilders/nabu/extend';TypeScript
interface MarkdownHelpers {
interrupts: (lines: string[], index: number) => boolean;
joinLines: boolean;
parseBlocks?: (lines: string[], overrides?: { joinLines?: boolean; softBreak?: string }) => PasteBlock[];
parseInline: (text: string) => Delta<string>[];
parseInlineSegments: (text: string) => any[];
softBreak?: string;
}Properties
| Property | Type | Description |
|---|---|---|
interrupts | (lines: string[], index: number) => boolean | Whether the line at |
joinLines | boolean | CommonMark semantics: consecutive lines join into one paragraph ( |
parseBlocksoptional | (lines: string[], overrides?: { joinLines?: boolean; softBreak?: string }) => PasteBlock[] | Parse lines as a document of their own (the body of a quote...) |
parseInline | (text: string) => Delta<string>[] | Inline markdown to a Loro delta |
parseInlineSegments | (text: string) => any[] | Inline markdown to segments (text, images...) |
softBreakoptional | string | What replaces a soft line break in a nested parse |
Source: src/lib/utils/extensions.js:74