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

404 lines
10 KiB
JSON
Raw Normal View History

{
"type": "Document",
"span": {
"start": 0,
"end": 340,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 0,
"end": 51,
"ctxt": 0
},
"name": "html",
"publicId": "-//W3C//DTD HTML 4.01//EN",
"systemId": null
},
{
"type": "Element",
"span": {
"start": 0,
"end": 332,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 53,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 0,
"end": 332,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 52,
"end": 57,
"ctxt": 0
},
"value": "Text\n"
},
{
"type": "Element",
"span": {
"start": 57,
"end": 66,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 62,
"end": 66,
"ctxt": 0
},
"value": "Text"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 73,
"end": 88,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 78,
"end": 88,
"ctxt": 0
},
"value": "\n Text\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 95,
"end": 121,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 100,
"end": 121,
"ctxt": 0
},
"value": "\n Text\n\n\n Text\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 128,
"end": 148,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 133,
"end": 148,
"ctxt": 0
},
"value": "Text\n\n\n Text"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 155,
"end": 175,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "test",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 173,
"end": 175,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 183,
"end": 207,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 205,
"end": 207,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 215,
"end": 239,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 237,
"end": 239,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 246,
"end": 247,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 247,
"end": 269,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "data-q",
"value": "test"
}
],
"children": [
{
"type": "Text",
"span": {
"start": 267,
"end": 269,
"ctxt": 0
},
"value": "\n\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 276,
"end": 277,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 277,
"end": 332,
"ctxt": 0
},
"tagName": "style",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 284,
"end": 332,
"ctxt": 0
},
"value": "\n\n.color {\n color: red;\n <!-- Test -->\n}\n\n"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
]
}