swc/crates/swc_html_parser/tests/fixture/text/cr/output.json
2022-05-17 08:23:24 +00:00

404 lines
10 KiB
JSON

{
"type": "Document",
"span": {
"start": 1,
"end": 341,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 1,
"end": 52,
"ctxt": 0
},
"name": "html",
"publicId": "-//W3C//DTD HTML 4.01//EN",
"systemId": null
},
{
"type": "Element",
"span": {
"start": 0,
"end": 333,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 54,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 0,
"end": 333,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 53,
"end": 58,
"ctxt": 0
},
"value": "Text\n"
},
{
"type": "Element",
"span": {
"start": 58,
"end": 67,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 63,
"end": 67,
"ctxt": 0
},
"value": "Text"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 74,
"end": 89,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 79,
"end": 89,
"ctxt": 0
},
"value": "\n Text\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 96,
"end": 122,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 101,
"end": 122,
"ctxt": 0
},
"value": "\n Text\n\n\n Text\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 129,
"end": 149,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 134,
"end": 149,
"ctxt": 0
},
"value": "Text\n\n\n Text"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 155,
"end": 156,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 156,
"end": 176,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 161,
"end": 172,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "test",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 174,
"end": 176,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 183,
"end": 184,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 184,
"end": 208,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 189,
"end": 204,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 206,
"end": 208,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 216,
"end": 240,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 221,
"end": 236,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 238,
"end": 240,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 247,
"end": 248,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 248,
"end": 270,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 253,
"end": 266,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 268,
"end": 270,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 278,
"end": 333,
"ctxt": 0
},
"tagName": "style",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 285,
"end": 333,
"ctxt": 0
},
"value": "\n\n.color {\n color: red;\n <!-- Test -->\n}\n\n"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
]
}