site/node_modules/micromark-extension-math/dev/lib/html.d.ts

24 lines
876 B
TypeScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
/**
* Create an extension for `micromark` to support math when serializing to
* HTML.
*
* > 👉 **Note**: this uses KaTeX to render math.
*
* @param {Options | null | undefined} [options={}]
* Configuration (default: `{}`).
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions`, to
* support math when serializing to HTML.
*/
export function mathHtml(options?: Options | null | undefined): HtmlExtension
export type KatexOptions = import('katex').KatexOptions
export type HtmlExtension = import('micromark-util-types').HtmlExtension
/**
* Configuration for HTML output.
*
* > 👉 **Note**: passed to `katex.renderToString`.
* > `displayMode` is overwritten by this plugin, to `false` for math in
* > text (inline), and `true` for math in flow (block).
*/
export type Options = Omit<KatexOptions, 'displayMode'>