swc/crates/swc_html_parser/tests/fixture/hidden-comments/output.json
2022-04-22 20:20:47 +09:00

159 lines
3.6 KiB
JSON

{
"type": "Document",
"span": {
"start": 0,
"end": 183,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 0,
"end": 15,
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null
},
{
"type": "Element",
"span": {
"start": 16,
"end": 183,
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Element",
"span": {
"start": 0,
"end": 29,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [],
"content": null
},
{
"type": "Element",
"span": {
"start": 23,
"end": 183,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 29,
"end": 31,
"ctxt": 0
},
"value": "\n\n"
},
{
"type": "Comment",
"span": {
"start": 31,
"end": 55,
"ctxt": 0
},
"data": "This is a comment"
},
{
"type": "Text",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Comment",
"span": {
"start": 56,
"end": 82,
"ctxt": 0
},
"data": " This is a comment "
},
{
"type": "Text",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 83,
"end": 106,
"ctxt": 0
},
"tagName": "p",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 86,
"end": 106,
"ctxt": 0
},
"value": "This is a paragraph."
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Comment",
"span": {
"start": 111,
"end": 161,
"ctxt": 0
},
"data": " Comments are not displayed in the browser "
},
{
"type": "Text",
"span": {
"start": 161,
"end": 183,
"ctxt": 0
},
"value": "\n\n\n \n\n\n"
}
],
"content": null
}
],
"content": null
}
]
}