Files
KaTeX/test/__snapshots__/katex-spec.js.snap
Kevin Barabash 71e0b35b27 allow sizing commands inside optional groups (#885)
* allow sizing commands inside optional groups

* allow color, old font, and style commands inside optional groups
2017-10-03 11:30:59 -06:00

179 lines
3.6 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
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": {
"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 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": {
"size": 5,
"value": [
{
"type": "textord",
"mode": "math",
"value": "3"
}
]
}
}
]
}
}
}
]
`;
exports[`An implicit group parser within optional groups should work wwith 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": {
"body": {
"type": "ordgroup",
"mode": "math",
"value": [
{
"type": "textord",
"mode": "math",
"value": "3"
}
]
},
"font": "mathtt"
}
}
]
}
}
}
]
`;