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

404 lines
10 KiB
JSON
Raw Normal View History

{
"type": "Document",
"span": {
"start": 1,
"end": 305,
"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": 0,
"end": 297,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 18,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 0,
"end": 297,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 17,
"end": 22,
"ctxt": 0
},
"value": "Text\n"
},
{
"type": "Element",
"span": {
"start": 22,
"end": 31,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 27,
"end": 31,
"ctxt": 0
},
"value": "Text"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 38,
"end": 53,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 43,
"end": 53,
"ctxt": 0
},
"value": "\n Text\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 60,
"end": 86,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 65,
"end": 86,
"ctxt": 0
},
"value": "\n Text\n\n\n Text\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 93,
"end": 113,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 98,
"end": 113,
"ctxt": 0
},
"value": "Text\n\n\n Text"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 120,
"end": 140,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 125,
"end": 136,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "test",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 138,
"end": 140,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 148,
"end": 172,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 153,
"end": 168,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 170,
"end": 172,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 180,
"end": 204,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 185,
"end": 200,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 202,
"end": 204,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 211,
"end": 212,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 212,
"end": 234,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 217,
"end": 230,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 232,
"end": 234,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 241,
"end": 242,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 242,
"end": 297,
"ctxt": 0
},
"tagName": "style",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 249,
"end": 297,
"ctxt": 0
},
"value": "\n\n.color {\n color: red;\n <!-- Test -->\n}\n\n"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
]
}