swc/crates/swc_html_parser/tests/fixture/text/entity/output.json

1487 lines
39 KiB
JSON
Raw Normal View History

2022-04-07 08:12:54 +03:00
{
"type": "Document",
"span": {
"start": 1,
"end": 1537,
2022-04-07 08:12:54 +03:00
"ctxt": 0
},
"mode": "no-quirks",
2022-04-07 08:12:54 +03:00
"children": [
{
"type": "DocumentType",
2022-04-07 08:12:54 +03:00
"span": {
"start": 1,
"end": 16,
2022-04-07 08:12:54 +03:00
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null
2022-04-07 08:12:54 +03:00
},
{
"type": "Element",
2022-04-07 08:12:54 +03:00
"span": {
"start": 17,
"end": 1537,
2022-04-07 08:12:54 +03:00
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 30,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 24,
"end": 1537,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 30,
"end": 32,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 32,
"end": 60,
"ctxt": 0
},
"tagName": "h1",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 36,
"end": 55,
"ctxt": 0
},
"value": "HTML Entity Example"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 60,
"end": 62,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 62,
"end": 97,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 67,
"end": 91,
"ctxt": 0
},
"value": "A space character: &"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 98,
"end": 133,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 103,
"end": 127,
"ctxt": 0
},
"value": "A space character: &"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 133,
"end": 134,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 134,
"end": 170,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 139,
"end": 164,
"ctxt": 0
},
"value": "A space character: &;"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 170,
"end": 172,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 172,
"end": 208,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 177,
"end": 202,
"ctxt": 0
},
"value": "A space character:  "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 208,
"end": 209,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 209,
"end": 244,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 214,
"end": 238,
"ctxt": 0
},
"value": "The less-than sign: <"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 244,
"end": 245,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 245,
"end": 283,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 250,
"end": 277,
"ctxt": 0
},
"value": "The greater-than sign: >"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 283,
"end": 284,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 284,
"end": 324,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 289,
"end": 318,
"ctxt": 0
},
"value": "The double quote sign: \""
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 324,
"end": 325,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 325,
"end": 365,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 330,
"end": 359,
"ctxt": 0
},
"value": "The single quote sign: '"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 365,
"end": 366,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 366,
"end": 398,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 371,
"end": 392,
"ctxt": 0
},
"value": "The cent sign: ¢"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 398,
"end": 399,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 399,
"end": 433,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 404,
"end": 427,
"ctxt": 0
},
"value": "The pound sign: £"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 433,
"end": 434,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 434,
"end": 464,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 439,
"end": 458,
"ctxt": 0
},
"value": "The yen sign: ¥"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 464,
"end": 465,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 465,
"end": 497,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 470,
"end": 491,
"ctxt": 0
},
"value": "The euro sign: €"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 497,
"end": 498,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 498,
"end": 535,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 503,
"end": 529,
"ctxt": 0
},
"value": "The copyright sign: ©"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 535,
"end": 536,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 536,
"end": 584,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 541,
"end": 578,
"ctxt": 0
},
"value": "The registered trade mark sign: ®"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 584,
"end": 586,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 586,
"end": 602,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 591,
"end": 596,
"ctxt": 0
},
"value": "®"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 602,
"end": 603,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 603,
"end": 619,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 608,
"end": 613,
"ctxt": 0
},
"value": "®"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 619,
"end": 620,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 620,
"end": 637,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 625,
"end": 631,
"ctxt": 0
},
"value": "®;"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 637,
"end": 638,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 638,
"end": 652,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 643,
"end": 646,
"ctxt": 0
},
2022-04-28 20:27:39 +03:00
"value": "reg"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 652,
"end": 654,
"ctxt": 0
},
2022-04-28 20:27:39 +03:00
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 654,
"end": 698,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 659,
"end": 692,
"ctxt": 0
},
"value": "∳"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 698,
"end": 699,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 699,
"end": 716,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 704,
"end": 710,
"ctxt": 0
},
"value": "&®"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 716,
"end": 718,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 718,
"end": 762,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 723,
"end": 756,
"ctxt": 0
},
"value": "An a with a grave accent: à"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 762,
"end": 763,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 763,
"end": 808,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 768,
"end": 802,
"ctxt": 0
},
"value": "An a with an acute accent: á"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 808,
"end": 809,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 809,
"end": 858,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 814,
"end": 852,
"ctxt": 0
},
"value": "An a with a circumflex accent: â"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 858,
"end": 859,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 859,
"end": 896,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 864,
"end": 890,
"ctxt": 0
},
"value": "An a with a tilde: ã"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 896,
"end": 897,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 897,
"end": 941,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 902,
"end": 935,
"ctxt": 0
},
"value": "An o with a grave accent: ò"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 941,
"end": 942,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 942,
"end": 987,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 947,
"end": 981,
"ctxt": 0
},
"value": "An o with an acute accent: ó"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 987,
"end": 988,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 988,
"end": 1037,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 993,
"end": 1031,
"ctxt": 0
},
"value": "An o with a circumflex accent: ô"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1037,
"end": 1038,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1038,
"end": 1075,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1043,
"end": 1069,
"ctxt": 0
},
"value": "An o with a tilde: õ"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1075,
"end": 1077,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 1077,
"end": 1109,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1082,
"end": 1104,
"ctxt": 0
},
"value": "A space character: &&"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1109,
"end": 1110,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1110,
"end": 1143,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1115,
"end": 1137,
"ctxt": 0
},
"value": "I'm ∉ I tell you"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1143,
"end": 1144,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1144,
"end": 1175,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1149,
"end": 1169,
"ctxt": 0
},
"value": "I'm ¬ I tell you"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1175,
"end": 1177,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 1177,
"end": 1240,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 1180,
"end": 1225,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "href",
"value": "http://lmgtfy.com/?l=1&q=rick+roll"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 1226,
"end": 1236,
"ctxt": 0
},
"value": "tired meme"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1240,
"end": 1241,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1241,
"end": 1334,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 1244,
"end": 1252,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "href",
"value": "#"
},
{
"type": "Attribute",
"span": {
"start": 1253,
"end": 1314,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "onclick",
"value": "window.location='?l=1&q=rick+roll';return false"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 1315,
"end": 1330,
"ctxt": 0
},
"value": "\n kablammo!\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1334,
"end": 1336,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 1336,
"end": 1355,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1341,
"end": 1349,
"ctxt": 0
},
"value": "✕"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1355,
"end": 1356,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1356,
"end": 1375,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1361,
"end": 1369,
"ctxt": 0
},
"value": "✕"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1375,
"end": 1376,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1376,
"end": 1390,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1381,
"end": 1384,
"ctxt": 0
},
"value": "✕"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1390,
"end": 1392,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 1392,
"end": 1409,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1397,
"end": 1403,
"ctxt": 0
},
"value": "$"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1409,
"end": 1410,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1410,
"end": 1426,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1415,
"end": 1420,
"ctxt": 0
},
"value": "$"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1426,
"end": 1427,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1427,
"end": 1446,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1432,
"end": 1440,
"ctxt": 0
},
"value": "$"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1446,
"end": 1448,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 1448,
"end": 1465,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1453,
"end": 1459,
"ctxt": 0
},
"value": "$"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1465,
"end": 1466,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 1466,
"end": 1483,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1471,
"end": 1477,
"ctxt": 0
},
"value": "$"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1483,
"end": 1485,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Element",
"span": {
"start": 1485,
"end": 1518,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 1490,
"end": 1512,
"ctxt": 0
},
"value": "I'm ∉ I tell you"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 1518,
"end": 1537,
"ctxt": 0
},
"value": "\n\n\n\n\n"
}
],
"content": null
2022-04-07 08:12:54 +03:00
}
],
"content": null
2022-04-07 08:12:54 +03:00
}
]
}