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

404 lines
10 KiB
JSON
Raw Normal View History

{
"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\r"
},
{
"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": "\r"
},
{
"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": "\r Text\r"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"value": "\r"
},
{
"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": "\r Text\r\r\r Text\r"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"value": "\r"
},
{
"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\r\r\r Text"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 155,
"end": 156,
"ctxt": 0
},
"value": "\r"
},
{
"type": "Element",
"span": {
"start": 156,
"end": 176,
"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": 174,
"end": 176,
"ctxt": 0
},
"value": "\r\r"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 183,
"end": 184,
"ctxt": 0
},
"value": "\r"
},
{
"type": "Element",
"span": {
"start": 184,
"end": 208,
"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": 206,
"end": 208,
"ctxt": 0
},
"value": "\r\r"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "\r"
},
{
"type": "Element",
"span": {
"start": 216,
"end": 240,
"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": 238,
"end": 240,
"ctxt": 0
},
"value": "\r\r"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 247,
"end": 248,
"ctxt": 0
},
"value": "\r"
},
{
"type": "Element",
"span": {
"start": 248,
"end": 270,
"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": 268,
"end": 270,
"ctxt": 0
},
"value": "\r\r"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "\r"
},
{
"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": "\r\r.color {\r color: red;\r <!-- Test -->\r}\r\r"
}
],
"content": null
}
],
"content": null
}
],
"content": null
}
]
}