Skip to main content

markdownify

Creates a markdown parser for the specified markdown text.

Signature

markdownify(
markdown: string,
context?: Context,
options?: {
features?: MarkdownFeatures;
placeholder?: string;
lineBreaks?: boolean;
}
): MarkdownParser<IVariable>

Parameters

NameTypeOptionalDescription
markdownstringNoSpecifies the markdown text to parse.
contextContextYesOptional context for the parser. This context is used when referencing variables.
optionsobjectYesSpecifies options for the parser. Supports the following options:
- features: Specifies the supported markdown features (defaults to Formatting and Hyperlinks);
- placeholder: Specifies the placeholder to use for empty variables;
- lineBreaks: Specifies if line breaks are supported (default is false).

Return value

Returns a MarkdownParser instance.