UNPKG

mathpix-markdown-it

Version:

Mathpix-markdown-it is an open source implementation of the mathpix-markdown spec written in Typescript. It relies on the following open source libraries: MathJax v3 (to render math with SVGs), markdown-it (for standard Markdown parsing)

13 lines (12 loc) 433 B
/** * Parse a comma-separated attribute string into an object. * * Examples: * "language=JavaScript, mathescape" * → { language: "JavaScript", mathescape: true } * * - Attributes are split by commas. * - Each attribute may be "key=value" or just "key" (interpreted as `true`). * - Whitespace around keys/values is trimmed. */ export declare const parseAttributes: (str: string) => Record<string, string | boolean>;