mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-12 22:48:41 +00:00
Flatten a bunch of non-pervasive ParseNode types (part 2) (#1552)
* Flatten "operatorname" ParseNode. * Flatten "overline" ParseNode. * Flatten "raisebox" ParseNode. * Flatten "rule" ParseNode. * Flatten "sizing" ParseNode. * Flatten "smash" ParseNode. * Flatten "sqrt" ParseNode. * Flatten "underline" ParseNode. * Flatten "enclose" ParseNode. * Flatten "environment" ParseNode. * Flatten "genfrac" ParseNode. * Flatten "htmlmathml" ParseNode. * Flatten "infix" ParseNode. * Flatten "kern" ParseNode. * Flatten "lap" ParseNode. * Flatten "color" ParseNode.
This commit is contained in:
@@ -643,42 +643,39 @@ exports[`An implicit group parser within optional groups should work style comma
|
||||
[
|
||||
{
|
||||
"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": [
|
||||
{
|
||||
"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",
|
||||
"mode": "math",
|
||||
"value": {
|
||||
"type": "styling",
|
||||
"style": "text",
|
||||
"value": [
|
||||
{
|
||||
"type": "textord",
|
||||
"mode": "math",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
"style": "text",
|
||||
"value": [
|
||||
{
|
||||
"type": "textord",
|
||||
"mode": "math",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode": "math"
|
||||
}
|
||||
]
|
||||
`;
|
||||
@@ -687,42 +684,36 @@ exports[`An implicit group parser within optional groups should work with \\colo
|
||||
[
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
"body": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "mathord",
|
||||
"mode": "math",
|
||||
"value": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"index": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "color",
|
||||
"body": [
|
||||
{
|
||||
"type": "textord",
|
||||
"mode": "math",
|
||||
"value": "3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"color": "red",
|
||||
"mode": "math"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode": "math"
|
||||
}
|
||||
]
|
||||
`;
|
||||
@@ -731,43 +722,40 @@ exports[`An implicit group parser within optional groups should work with old fo
|
||||
[
|
||||
{
|
||||
"type": "sqrt",
|
||||
"mode": "math",
|
||||
"value": {
|
||||
"type": "sqrt",
|
||||
"body": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "mathord",
|
||||
"body": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "mathord",
|
||||
"mode": "math",
|
||||
"value": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"index": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "font",
|
||||
"body": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"index": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "font",
|
||||
"body": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "textord",
|
||||
"mode": "math",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"font": "mathtt",
|
||||
"mode": "math"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"value": [
|
||||
{
|
||||
"type": "textord",
|
||||
"mode": "math",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"font": "mathtt",
|
||||
"mode": "math"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode": "math"
|
||||
}
|
||||
]
|
||||
`;
|
||||
@@ -776,42 +764,36 @@ exports[`An implicit group parser within optional groups should work with sizing
|
||||
[
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
"body": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "mathord",
|
||||
"mode": "math",
|
||||
"value": "x"
|
||||
}
|
||||
]
|
||||
},
|
||||
"index": {
|
||||
"type": "ordgroup",
|
||||
"mode": "math",
|
||||
"value": [
|
||||
{
|
||||
"type": "sizing",
|
||||
"body": [
|
||||
{
|
||||
"type": "textord",
|
||||
"mode": "math",
|
||||
"value": "3"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"mode": "math",
|
||||
"size": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode": "math"
|
||||
}
|
||||
]
|
||||
`;
|
||||
|
Reference in New Issue
Block a user