@nolebase/markdown-it-element-transform
Version:
A markdown-it plugin that transforms elements.
24 lines (21 loc) • 808 B
TypeScript
import { PluginWithOptions } from 'markdown-it';
import StateCore from 'markdown-it/lib/rules_core/state_core.mjs';
import Token from 'markdown-it/lib/token.mjs';
interface Options {
/**
* The function to transform the token
* @param {Token} token The token to be transformed
* @param {StateCore} state The state of the markdown-it
* @param {object} env The environment of the markdown-it
*/
transform: (token: Token, state: StateCore, env: any) => void;
}
/**
* A markdown-it plugin to transform the token
* @param md The markdown-it instance
* @param options The options for the plugin
* @param options.transform The function to transform the token
*/
declare const ElementTransform: PluginWithOptions<Options>;
export { ElementTransform };
export type { Options };