UNPKG

remark-ins

Version:

Remark plugin to add ins element in markdown

46 lines (45 loc) 1.13 kB
import type { Plugin } from "unified"; import type { Data, Parent, PhrasingContent, Root } from "mdast"; interface InsertData extends Data { } interface Insert extends Parent { /** * Node type of mdast Insert. */ type: "insert"; /** * Children of paragraph. */ children: PhrasingContent[]; /** * Data associated with the mdast paragraph. */ data?: InsertData | undefined; } declare module "mdast" { interface PhrasingContentMap { insert: Insert; } interface RootContentMap { insert: Insert; } } export declare const REGEX: RegExp; export declare const REGEX_GLOBAL: RegExp; export declare const REGEX_STARTING: RegExp; export declare const REGEX_STARTING_GLOBAL: RegExp; export declare const REGEX_ENDING: RegExp; export declare const REGEX_ENDING_GLOBAL: RegExp; export declare const REGEX_EMPTY: RegExp; export declare const REGEX_EMPTY_GLOBAL: RegExp; /** * * This plugin turns ++text++ into a <ins>text</ins> * * for example: * * Here is ++inserted text++ * */ export declare const plugin: Plugin<void[], Root>; export default plugin;