svem
Version:
Svelte in Markdown preprocessor
21 lines (18 loc) • 837 B
TypeScript
import { XNode } from './attribute.js';
import { Plugin } from 'unified';
import 'mdast';
type XHTMLNode = XNode & {
type: 'html-node';
tagName: string;
escape?: boolean;
children?: Array<XHTMLNode | XNode>;
};
type HTMLOptions = {
brandAlias?: string;
};
declare const remarkHtmlNodes: Plugin<[HTMLOptions | undefined], XNode>;
declare const findNode: (node: XHTMLNode, fn: (n: XNode | XHTMLNode) => boolean | void) => XNode | XHTMLNode;
declare const findNodes: (node: XHTMLNode, fn: (n: XNode | XHTMLNode) => boolean | void) => (XNode | XHTMLNode)[];
declare const flattenHtmlNodes: (node: XHTMLNode, parent: XHTMLNode, indent?: number) => void;
declare const escapeHtml: (value: string) => string;
export { type HTMLOptions, type XHTMLNode, escapeHtml, findNode, findNodes, flattenHtmlNodes, remarkHtmlNodes };