swc/crates/swc_html_parser/tests/fixture/element/math-1/output.json

1461 lines
50 KiB
JSON
Raw Normal View History

{
"type": "Document",
"span": {
"start": 1,
"end": 1171,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 1,
"end": 16,
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null
},
{
"type": "Element",
"span": {
"start": 17,
"end": 1171,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 23,
"end": 32,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "lang",
"value": "en"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 34,
"end": 76,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 40,
"end": 45,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 45,
"end": 68,
"ctxt": 0
},
"tagName": "title",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 52,
"end": 60,
"ctxt": 0
},
"data": "Document"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"data": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"data": "\n"
},
{
"type": "Element",
"span": {
"start": 77,
"end": 1164,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"data": "\n"
},
{
"type": "Element",
"span": {
"start": 84,
"end": 615,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 89,
"end": 109,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "style",
"value": "display:none"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 110,
"end": 115,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 115,
"end": 155,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 120,
"end": 149,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 126,
"end": 133,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "m1"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 134,
"end": 142,
"ctxt": 0
},
"tagName": "mtext",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 155,
"end": 160,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 160,
"end": 204,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 165,
"end": 172,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "d1"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 173,
"end": 198,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 179,
"end": 186,
"ctxt": 0
},
"tagName": "mrow",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 186,
"end": 191,
"ctxt": 0
},
"tagName": "mi",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 204,
"end": 209,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 209,
"end": 287,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 214,
"end": 221,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "d2"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 222,
"end": 281,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 228,
"end": 274,
"ctxt": 0
},
"tagName": "mrow",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 234,
"end": 257,
"ctxt": 0
},
"tagName": "mrow",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 240,
"end": 250,
"ctxt": 0
},
"tagName": "mn",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 244,
"end": 245,
"ctxt": 0
},
"data": "1"
}
],
"content": null
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 257,
"end": 267,
"ctxt": 0
},
"tagName": "mi",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 261,
"end": 262,
"ctxt": 0
},
"data": "a"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 287,
"end": 292,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 292,
"end": 323,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 297,
"end": 304,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "d3"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 305,
"end": 317,
"ctxt": 0
},
"data": "⟨⟩"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 323,
"end": 328,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 328,
"end": 353,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 333,
"end": 340,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "d4"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 341,
"end": 347,
"ctxt": 0
},
"data": "𝕂"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 353,
"end": 358,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 358,
"end": 468,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 363,
"end": 370,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "d5"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 371,
"end": 462,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 377,
"end": 455,
"ctxt": 0
},
"tagName": "semantics",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 388,
"end": 398,
"ctxt": 0
},
"tagName": "mi",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 392,
"end": 393,
"ctxt": 0
},
"data": "a"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 398,
"end": 443,
"ctxt": 0
},
"tagName": "annotation-xml",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 414,
"end": 420,
"ctxt": 0
},
"tagName": "foo",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 420,
"end": 426,
"ctxt": 0
},
"tagName": "bar",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 468,
"end": 473,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 473,
"end": 608,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 478,
"end": 485,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "d6"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 486,
"end": 602,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 492,
"end": 590,
"ctxt": 0
},
"tagName": "semantics",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 503,
"end": 513,
"ctxt": 0
},
"tagName": "mi",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 507,
"end": 508,
"ctxt": 0
},
"data": "a"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 513,
"end": 578,
"ctxt": 0
},
"tagName": "annotation-xml",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 529,
"end": 549,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "encoding",
"value": "text/html"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 550,
"end": 561,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 590,
"end": 595,
"ctxt": 0
},
"tagName": "mn",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 608,
"end": 609,
"ctxt": 0
},
"data": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 615,
"end": 617,
"ctxt": 0
},
"data": "\n\n"
},
{
"type": "Element",
"span": {
"start": 617,
"end": 1155,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 622,
"end": 627,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 627,
"end": 667,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 632,
"end": 661,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 638,
"end": 645,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "m1"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 646,
"end": 654,
"ctxt": 0
},
"tagName": "mtext",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 667,
"end": 672,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 672,
"end": 729,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 677,
"end": 684,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "d1"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 685,
"end": 723,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 691,
"end": 716,
"ctxt": 0
},
"tagName": "mi",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 695,
"end": 713,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "mathvariant",
"value": "BOLD"
}
],
"children": [],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 729,
"end": 734,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 734,
"end": 880,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 739,
"end": 746,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "d2"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 747,
"end": 874,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 753,
"end": 867,
"ctxt": 0
},
"tagName": "semantics",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 764,
"end": 799,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "definitionURL",
"value": "www.example.org/FOO"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 800,
"end": 810,
"ctxt": 0
},
"tagName": "mi",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 804,
"end": 805,
"ctxt": 0
},
"data": "a"
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 810,
"end": 855,
"ctxt": 0
},
"tagName": "annotation-xml",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 826,
"end": 832,
"ctxt": 0
},
"tagName": "foo",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 832,
"end": 838,
"ctxt": 0
},
"tagName": "bar",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 880,
"end": 885,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 885,
"end": 956,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 890,
"end": 950,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 896,
"end": 913,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "m3span-mtext"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 914,
"end": 943,
"ctxt": 0
},
"tagName": "mtext",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 921,
"end": 935,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 927,
"end": 928,
"ctxt": 0
},
"data": "x"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 956,
"end": 961,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 961,
"end": 1023,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 966,
"end": 1017,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 972,
"end": 986,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "m3span-mi"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 987,
"end": 1010,
"ctxt": 0
},
"tagName": "mi",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 991,
"end": 1005,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 997,
"end": 998,
"ctxt": 0
},
"data": "x"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1023,
"end": 1028,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 1028,
"end": 1090,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 1033,
"end": 1084,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 1039,
"end": 1053,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "m3p-mtext"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 1054,
"end": 1077,
"ctxt": 0
},
"tagName": "mtext",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 1061,
"end": 1069,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1064,
"end": 1065,
"ctxt": 0
},
"data": "x"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1090,
"end": 1095,
"ctxt": 0
},
"data": "\n "
},
{
"type": "Element",
"span": {
"start": 1095,
"end": 1148,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 1100,
"end": 1142,
"ctxt": 0
},
"tagName": "math",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 1106,
"end": 1117,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "id",
"value": "m3p-mi"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 1118,
"end": 1135,
"ctxt": 0
},
"tagName": "mi",
"namespace": "http://www.w3.org/1998/Math/MathML",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 1122,
"end": 1130,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1125,
"end": 1126,
"ctxt": 0
},
"data": "x"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1148,
"end": 1149,
"ctxt": 0
},
"data": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1155,
"end": 1164,
"ctxt": 0
},
"data": "\n\n"
}
],
"content": null
}
],
"content": null
}
]
}