// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`A begin/end parser should grab \\arraystretch 1`] = ` [ { "type": "array", "mode": "math", "value": { "type": "array", "arraystretch": 1.5, "body": [ [ { "type": "styling", "mode": "math", "value": { "type": "styling", "style": "text", "value": [ { "type": "ordgroup", "mode": "math", "value": [ { "type": "mathord", "loc": { "end": 37, "lexer": { "input": "\\\\def\\\\arraystretch{1.5}\\\\begin{matrix}a&b\\\\\\\\c&d\\\\end{matrix}", "pos": 56 }, "start": 36 }, "mode": "math", "value": "a" } ] } ] } }, { "type": "styling", "mode": "math", "value": { "type": "styling", "style": "text", "value": [ { "type": "ordgroup", "mode": "math", "value": [ { "type": "mathord", "loc": { "end": 39, "lexer": { "input": "\\\\def\\\\arraystretch{1.5}\\\\begin{matrix}a&b\\\\\\\\c&d\\\\end{matrix}", "pos": 56 }, "start": 38 }, "mode": "math", "value": "b" } ] } ] } } ], [ { "type": "styling", "mode": "math", "value": { "type": "styling", "style": "text", "value": [ { "type": "ordgroup", "mode": "math", "value": [ { "type": "mathord", "loc": { "end": 42, "lexer": { "input": "\\\\def\\\\arraystretch{1.5}\\\\begin{matrix}a&b\\\\\\\\c&d\\\\end{matrix}", "pos": 56 }, "start": 41 }, "mode": "math", "value": "c" } ] } ] } }, { "type": "styling", "mode": "math", "value": { "type": "styling", "style": "text", "value": [ { "type": "ordgroup", "mode": "math", "value": [ { "type": "mathord", "loc": { "end": 44, "lexer": { "input": "\\\\def\\\\arraystretch{1.5}\\\\begin{matrix}a&b\\\\\\\\c&d\\\\end{matrix}", "pos": 56 }, "start": 43 }, "mode": "math", "value": "d" } ] } ] } } ] ], "hLinesBeforeRow": [ [ ], [ ], [ ] ], "hskipBeforeAndAfter": false, "rowGaps": [ null ] } } ] `; exports[`A parser that does not throw on unsupported commands should build katex-error span for other type of KaTeX error 1`] = ` { "attributes": { "style": "color:#933", "title": "ParseError: KaTeX parse error: Double superscript at position 4: 2^2^̲2" }, "children": [ { "classes": [ ], "depth": 0, "height": 0, "italic": 0, "maxFontSize": 0, "skew": 0, "style": { }, "value": "2^2^2", "width": 0 } ], "classes": [ "katex-error" ], "depth": 0, "height": 0, "maxFontSize": 0, "style": { } } `; exports[`A parser that does not throw on unsupported commands should properly escape LaTeX in errors 1`] = ` 2^&"<> `; exports[`An implicit group parser within optional groups should work style commands \\sqrt[\\textstyle 3]{x} 1`] = ` [ { "type": "sqrt", "mode": "math", "value": { "type": "sqrt", "body": { "type": "ordgroup", "mode": "math", "value": [ { "type": "mathord", "mode": "math", "value": "x" } ] }, "index": { "type": "ordgroup", "mode": "math", "value": [ { "type": "styling", "mode": "math", "value": { "type": "styling", "style": "text", "value": [ { "type": "textord", "mode": "math", "value": "3" } ] } } ] } } } ] `; exports[`An implicit group parser within optional groups should work with \\color: \\sqrt[\\color{red} 3]{x} 1`] = ` [ { "type": "sqrt", "mode": "math", "value": { "type": "sqrt", "body": { "type": "ordgroup", "mode": "math", "value": [ { "type": "mathord", "mode": "math", "value": "x" } ] }, "index": { "type": "ordgroup", "mode": "math", "value": [ { "type": "color", "mode": "math", "value": { "type": "color", "color": "red", "value": [ { "type": "textord", "mode": "math", "value": "3" } ] } } ] } } } ] `; exports[`An implicit group parser within optional groups should work with old font functions: \\sqrt[\\tt 3]{x} 1`] = ` [ { "type": "sqrt", "mode": "math", "value": { "type": "sqrt", "body": { "type": "ordgroup", "mode": "math", "value": [ { "type": "mathord", "mode": "math", "value": "x" } ] }, "index": { "type": "ordgroup", "mode": "math", "value": [ { "type": "font", "mode": "math", "value": { "type": "font", "body": { "type": "ordgroup", "mode": "math", "value": [ { "type": "textord", "mode": "math", "value": "3" } ] }, "font": "mathtt" } } ] } } } ] `; exports[`An implicit group parser within optional groups should work with sizing commands: \\sqrt[\\small 3]{x} 1`] = ` [ { "type": "sqrt", "mode": "math", "value": { "type": "sqrt", "body": { "type": "ordgroup", "mode": "math", "value": [ { "type": "mathord", "mode": "math", "value": "x" } ] }, "index": { "type": "ordgroup", "mode": "math", "value": [ { "type": "sizing", "mode": "math", "value": { "type": "sizing", "size": 5, "value": [ { "type": "textord", "mode": "math", "value": "3" } ] } } ] } } } ] `;