swc/crates/swc_html_parser/tests/recovery/text/cdata/output.json

698 lines
19 KiB
JSON

{
"type": "Document",
"span": {
"start": 1,
"end": 620,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 1,
"end": 16,
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null,
"raw": "<!doctype html>"
},
{
"type": "Element",
"span": {
"start": 17,
"end": 620,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 23,
"end": 32,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "lang",
"rawName": "lang",
"value": "en",
"rawValue": "\"en\""
}
],
"children": [
{
"type": "Element",
"span": {
"start": 34,
"end": 76,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 40,
"end": 45,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 45,
"end": 68,
"ctxt": 0
},
"tagName": "title",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 52,
"end": 60,
"ctxt": 0
},
"data": "Document",
"raw": "Document"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 77,
"end": 613,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 84,
"end": 110,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Comment",
"span": {
"start": 87,
"end": 106,
"ctxt": 0
},
"data": "[CDATA[content]]",
"raw": "<![CDATA[content]]>"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 111,
"end": 137,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Comment",
"span": {
"start": 114,
"end": 133,
"ctxt": 0
},
"data": "[CDATA[&amping]]",
"raw": "<![CDATA[&amping]]>"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 138,
"end": 166,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Comment",
"span": {
"start": 141,
"end": 162,
"ctxt": 0
},
"data": "[CDATA[&amping ]]]",
"raw": "<![CDATA[&amping ]]]>"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 167,
"end": 196,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Comment",
"span": {
"start": 170,
"end": 192,
"ctxt": 0
},
"data": "[CDATA[&amping]] ]]",
"raw": "<![CDATA[&amping]] ]]>"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 197,
"end": 239,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Comment",
"span": {
"start": 200,
"end": 218,
"ctxt": 0
},
"data": "[CDATA[<message",
"raw": "<![CDATA[<message>"
},
{
"type": "Text",
"span": {
"start": 218,
"end": 235,
"ctxt": 0
},
"data": "text]]>",
"raw": "text]]>"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 239,
"end": 240,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 240,
"end": 310,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Comment",
"span": {
"start": 243,
"end": 303,
"ctxt": 0
},
"data": "[CDATA[</this is malformed!</malformed</malformed & worse",
"raw": "<![CDATA[</this is malformed!</malformed</malformed & worse>"
},
{
"type": "Text",
"span": {
"start": 303,
"end": 306,
"ctxt": 0
},
"data": "]]>",
"raw": "]]>"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 311,
"end": 344,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Comment",
"span": {
"start": 314,
"end": 327,
"ctxt": 0
},
"data": "[CDATA[1]]",
"raw": "<![CDATA[1]]>"
},
{
"type": "Comment",
"span": {
"start": 327,
"end": 340,
"ctxt": 0
},
"data": "[CDATA[2]]",
"raw": "<![CDATA[2]]>"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 344,
"end": 345,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 345,
"end": 374,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 348,
"end": 353,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Comment",
"span": {
"start": 353,
"end": 369,
"ctxt": 0
},
"data": "[CDATA[data]]",
"raw": "<![CDATA[data]]>"
},
{
"type": "Text",
"span": {
"start": 369,
"end": 370,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 374,
"end": 375,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 375,
"end": 408,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Comment",
"span": {
"start": 378,
"end": 404,
"ctxt": 0
},
"data": "[CDATA[bracket ]after]]",
"raw": "<![CDATA[bracket ]after]]>"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 408,
"end": 409,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
},
{
"type": "Element",
"span": {
"start": 409,
"end": 604,
"ctxt": 0
},
"tagName": "svg",
"namespace": "http://www.w3.org/2000/svg",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 414,
"end": 435,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "viewBox",
"rawName": "viewBox",
"value": "0 0 100 100",
"rawValue": "\"0 0 100 100\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 436,
"end": 441,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 441,
"end": 521,
"ctxt": 0
},
"tagName": "foreignObject",
"namespace": "http://www.w3.org/2000/svg",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 456,
"end": 469,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "width",
"rawName": "width",
"value": "100px",
"rawValue": "\"100px\""
},
{
"type": "Attribute",
"span": {
"start": 470,
"end": 484,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "height",
"rawName": "height",
"value": "100px",
"rawValue": "\"100px\""
}
],
"children": [
{
"type": "Text",
"span": {
"start": 485,
"end": 505,
"ctxt": 0
},
"data": "contenta",
"raw": "contenta"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 521,
"end": 526,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 526,
"end": 558,
"ctxt": 0
},
"tagName": "desc",
"namespace": "http://www.w3.org/2000/svg",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 532,
"end": 548,
"ctxt": 0
},
"data": "content",
"raw": "content"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 558,
"end": 563,
"ctxt": 0
},
"data": "\n ",
"raw": "\n "
},
{
"type": "Element",
"span": {
"start": 563,
"end": 597,
"ctxt": 0
},
"tagName": "title",
"namespace": "http://www.w3.org/2000/svg",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 570,
"end": 586,
"ctxt": 0
},
"data": "content",
"raw": "content"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 597,
"end": 598,
"ctxt": 0
},
"data": "\n",
"raw": "\n"
}
],
"content": null,
"isSelfClosing": false
},
{
"type": "Text",
"span": {
"start": 604,
"end": 613,
"ctxt": 0
},
"data": "\n\n",
"raw": "\n\n"
}
],
"content": null,
"isSelfClosing": false
}
],
"content": null,
"isSelfClosing": false
}
]
}