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)

25 lines (24 loc) 1.04 kB
import type { RuleBlock } from 'markdown-it/lib/parser_block'; import { StateBlockLike } from "./latex-list-types"; /** * Parse a LaTeX list environment starting at `startLine` and emit tokens into `state`. * * Notes: * - The function is "strict": it returns false if the matching \end{...} is not found. * - Works with any StateBlock-like object (real block state or synthetic state for inline reuse). * * @returns true if the environment was successfully parsed and closed, otherwise false. */ export declare const ListsInternal: (state: StateBlockLike, startLine: number, endLine: number) => boolean; /** * Block rule that parses LaTeX list environments: * \begin{itemize} ... \end{itemize} * \begin{enumerate} ... \end{enumerate} * * It: * - detects list begin/end commands, * - collects and splits \item content into logical items, * - handles \setcounter and nested lists on the same line, * - emits corresponding *_list_open, *_list_close, and list item tokens. */ export declare const Lists: RuleBlock;