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)

46 lines (45 loc) 1.5 kB
import { RuleBlock, Token } from 'markdown-it'; export declare const openTag: RegExp; export declare const openTagG: RegExp; export declare const closeTag: RegExp; type TTypeContent = { type?: string; content?: string; align?: string; }; type TTypeContentList = Array<TTypeContent>; export type TAttrs = string[]; export type TTokenTabular = { token: string; type?: string; tag: string; n: number; content?: string; attrs?: Array<TAttrs>; children?: Token; id?: string; ascii?: string; ascii_tsv?: string; ascii_csv?: string; ascii_md?: string; latex?: string; parents?: Array<string>; isSubTabular?: boolean; meta?: any; }; export type TMulti = { mr?: number; mc?: number; attrs: Array<TAttrs>; content?: string; subTable?: Array<TTokenTabular>; latex: string; multi?: any; }; export declare const parseInlineTabular: (str: string) => TTypeContentList | null; export declare const inlineDecimalParse: (tok: TTokenTabular) => TTokenTabular; export declare const StatePushTabulars: (state: any, cTabular: TTypeContentList, align: string, startLine: number) => void; export declare const StatePushDiv: (state: any, startLine: number, nextLine: number, content: string) => void; export declare const StatePushTabularBlock: (state: any, startLine: number, nextLine: number, content: string, align: string, centerTables?: boolean) => boolean; export declare const BeginTabular: RuleBlock; export {};