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

495 lines
14 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": 24,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 0,
"end": 289,
"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": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"value": "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
},
"value": "Italic and Red"
}
],
"content": null
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 24,
"end": 96,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 41,
"end": 79,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 8,
"end": 59,
"ctxt": 0
},
"tagName": "font",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"value": "red"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 44,
"end": 59,
"ctxt": 0
},
"value": "Italic and Red "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 66,
"end": 79,
"ctxt": 0
},
"value": " Just italic."
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 83,
"end": 96,
"ctxt": 0
},
"value": " Italic only."
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 100,
"end": 107,
"ctxt": 0
},
"value": " Plain\n"
},
{
"type": "Element",
"span": {
"start": 107,
"end": 170,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 110,
"end": 131,
"ctxt": 0
},
"value": "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": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"value": "red"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 147,
"end": 152,
"ctxt": 0
},
"value": "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
},
"value": "Italic and red."
}
],
"content": null
}
],
"content": null
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 131,
"end": 175,
"ctxt": 0
},
"tagName": "font",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"value": "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
},
"value": "\n"
}
],
"content": null
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 175,
"end": 231,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 131,
"end": 203,
"ctxt": 0
},
"tagName": "font",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "color",
"value": "red"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 152,
"end": 194,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 178,
"end": 194,
"ctxt": 0
},
"value": "Italic and red. "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 198,
"end": 203,
"ctxt": 0
},
"value": " Red."
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 210,
"end": 231,
"ctxt": 0
},
"value": " I should not be red."
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 235,
"end": 236,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 236,
"end": 262,
"ctxt": 0
},
"tagName": "b",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 239,
"end": 244,
"ctxt": 0
},
"value": "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
},
"value": "Bold and italic"
}
],
"content": null
}
],
"content": null
},
{
"type": "Element",
"span": {
"start": 244,
"end": 279,
"ctxt": 0
},
"tagName": "i",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 266,
"end": 279,
"ctxt": 0
},
"value": " Only Italic "
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 283,
"end": 289,
"ctxt": 0
},
"value": " Plain"
}
],
"content": null
}
],
"content": null
}
]
}