UNPKG

rehype-typeset

Version:
28 lines (27 loc) 783 B
/** * Process HTML content for better web typography. * * @param {PluginOptions} [options] */ export default function rehypeTypeset(options?: PluginOptions): (tree: Root) => undefined; export type QuotesOptions = any; export type PunctuationOptions = { /** * Replace hyphen * sequences with em-dash glyph. If `triple` is set, two hyphens will * be replaced with an en-dash. */ "em-dash-replacement": "double" | "triple"; }; export type SpacesOptions = { /** * Should en-dashes be surrounded by spaces. */ "en-dash-spacing"?: "open" | "closed"; }; export type PluginOptions = { quotes?: QuotesOptions | false; punctuation?: PunctuationOptions | false; spaces?: SpacesOptions | false; }; import type { Root } from 'hast';