swc/crates/swc_html_parser/tests/fixture/comment-cdata/output.json
2022-04-06 14:59:10 +09:00

145 lines
3.0 KiB
JSON

{
"type": "Document",
"span": {
"start": 0,
"end": 711,
"ctxt": 0
},
"children": [
{
"type": "TokenAndSpan",
"span": {
"start": 0,
"end": 347,
"ctxt": 0
},
"token": {
"Comment": {
"data": "[CDATA[\nWithin this Character Data block I can\nuse double dashes as much as I want (along with <, &, ', and \")\n*and* %MyParamEntity; will be expanded to the text\n\"Has been expanded\" ... however, I can't use\nthe CEND sequence. If I need to use CEND I must escape one of the\nbrackets or the greater-than sign using concatenated CDATA sections.\n]]"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 347,
"end": 348,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 348,
"end": 353,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "div",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 353,
"end": 354,
"ctxt": 0
},
"token": {
"Character": {
"value": "t"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 354,
"end": 355,
"ctxt": 0
},
"token": {
"Character": {
"value": "e"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 355,
"end": 356,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 356,
"end": 357,
"ctxt": 0
},
"token": {
"Character": {
"value": "t"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 357,
"end": 363,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "div",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 363,
"end": 364,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 364,
"end": 711,
"ctxt": 0
},
"token": {
"Comment": {
"data": "[cdata[\nWithin this Character Data block I can\nuse double dashes as much as I want (along with <, &, ', and \")\n*and* %MyParamEntity; will be expanded to the text\n\"Has been expanded\" ... however, I can't use\nthe CEND sequence. If I need to use CEND I must escape one of the\nbrackets or the greater-than sign using concatenated CDATA sections.\n]]"
}
}
}
]
}