swc/crates/swc_html_parser/tests/html5lib-tests-fixture/tricky01_dat.1.output.json

541 lines
16 KiB
JSON

{
"type": "Document",
"span": {
"start": 1,
"end": 289,
"ctxt": 0
},
"mode": "quirks",
"children": [
{
"type": "Element",
"span": {
"start": 1,
"end": 289,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null,
"isSelfClosing": false
},
{
"type": "Element",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 8,
"end": 41,
"ctxt": 0
},
"tagName": "font",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 14,
"end": 23,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"rawName": "color",
"value": "red",
"rawValue": "red"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 24,
"end": 41,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 27,
"end": 41,
"ctxt": 0
},
"data": "Italic and Red",
"raw": "Italic and Red"
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Element",
"span": {
"start": 24,
"end": 100,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 41,
"end": 83,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 44,
"end": 66,
"ctxt": 0
},
"tagName": "font",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 14,
"end": 23,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"rawName": "color",
"value": "red",
"rawValue": "red"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 44,
"end": 59,
"ctxt": 0
},
"data": "Italic and Red ",
"raw": "Italic and Red "
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 66,
"end": 79,
"ctxt": 0
},
"data": " Just italic.",
"raw": " Just italic."
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 83,
"end": 96,
"ctxt": 0
},
"data": " Italic only.",
"raw": " Italic only."
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 100,
"end": 107,
"ctxt": 0
},
"data": " Plain\n",
"raw": " Plain\n"
},
{
"type": "Element",
"span": {
"start": 107,
"end": 174,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 110,
"end": 131,
"ctxt": 0
},
"data": "I should not be red. ",
"raw": "I should not be red. "
},
{
"type": "Element",
"span": {
"start": 131,
"end": 170,
"ctxt": 0
},
"tagName": "font",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 137,
"end": 146,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"rawName": "color",
"value": "red",
"rawValue": "red"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 147,
"end": 152,
"ctxt": 0
},
"data": "Red. ",
"raw": "Red. "
},
{
"type": "Element",
"span": {
"start": 152,
"end": 170,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 155,
"end": 170,
"ctxt": 0
},
"data": "Italic and red.",
"raw": "Italic and red."
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Element",
"span": {
"start": 131,
"end": 175,
"ctxt": 0
},
"tagName": "font",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 137,
"end": 146,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"rawName": "color",
"value": "red",
"rawValue": "red"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 152,
"end": 175,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Element",
"span": {
"start": 175,
"end": 235,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 178,
"end": 210,
"ctxt": 0
},
"tagName": "font",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 137,
"end": 146,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"rawName": "color",
"value": "red",
"rawValue": "red"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 178,
"end": 198,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 178,
"end": 194,
"ctxt": 0
},
"data": "Italic and red. ",
"raw": "Italic and red. "
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 198,
"end": 203,
"ctxt": 0
},
"data": " Red.",
"raw": " Red."
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 210,
"end": 231,
"ctxt": 0
},
"data": " I should not be red.",
"raw": " I should not be red."
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 236,
"end": 266,
"ctxt": 0
},
"tagName": "b",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 239,
"end": 244,
"ctxt": 0
},
"data": "Bold ",
"raw": "Bold "
},
{
"type": "Element",
"span": {
"start": 244,
"end": 262,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 247,
"end": 262,
"ctxt": 0
},
"data": "Bold and italic",
"raw": "Bold and italic"
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Element",
"span": {
"start": 244,
"end": 283,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 266,
"end": 279,
"ctxt": 0
},
"data": " Only Italic ",
"raw": " Only Italic "
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 283,
"end": 289,
"ctxt": 0
},
"data": " Plain",
"raw": " Plain"
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
}
]
}