swc/crates/swc_html_parser/tests/fixture/headings/output.json

1762 lines
28 KiB
JSON
Raw Normal View History

2022-04-04 07:12:45 +03:00
{
"type": "Document",
"span": {
"start": 0,
"end": 210,
"ctxt": 0
},
"children": [
{
"type": "TokenAndSpan",
"span": {
"start": 0,
"end": 15,
"ctxt": 0
},
"token": {
"Doctype": {
"name": "html",
"force_quirks": false,
"public_id": null,
"system_id": null
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 16,
"end": 22,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "html",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 23,
"end": 29,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "body",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 29,
"end": 30,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 31,
"end": 35,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "h1",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"token": {
"Character": {
"value": "T"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 39,
"end": 40,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 44,
"end": 45,
"ctxt": 0
},
"token": {
"Character": {
"value": "e"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"token": {
"Character": {
"value": "d"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"token": {
"Character": {
"value": "n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"token": {
"Character": {
"value": "1"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 52,
"end": 57,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "h1",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 58,
"end": 62,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "h2",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"token": {
"Character": {
"value": "T"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 63,
"end": 64,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 64,
"end": 65,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 65,
"end": 66,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 69,
"end": 70,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 71,
"end": 72,
"ctxt": 0
},
"token": {
"Character": {
"value": "e"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"token": {
"Character": {
"value": "d"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"token": {
"Character": {
"value": "n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"token": {
"Character": {
"value": "2"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 79,
"end": 84,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "h2",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 85,
"end": 89,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "h3",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 89,
"end": 90,
"ctxt": 0
},
"token": {
"Character": {
"value": "T"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 90,
"end": 91,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 91,
"end": 92,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 93,
"end": 94,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 95,
"end": 96,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 96,
"end": 97,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 98,
"end": 99,
"ctxt": 0
},
"token": {
"Character": {
"value": "e"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 100,
"end": 101,
"ctxt": 0
},
"token": {
"Character": {
"value": "d"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"token": {
"Character": {
"value": "n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 103,
"end": 104,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 105,
"end": 106,
"ctxt": 0
},
"token": {
"Character": {
"value": "3"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 106,
"end": 111,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "h3",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 112,
"end": 116,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "h4",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"token": {
"Character": {
"value": "T"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 117,
"end": 118,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 118,
"end": 119,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 121,
"end": 122,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 123,
"end": 124,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 124,
"end": 125,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 125,
"end": 126,
"ctxt": 0
},
"token": {
"Character": {
"value": "e"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 127,
"end": 128,
"ctxt": 0
},
"token": {
"Character": {
"value": "d"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 128,
"end": 129,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 129,
"end": 130,
"ctxt": 0
},
"token": {
"Character": {
"value": "n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 131,
"end": 132,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 132,
"end": 133,
"ctxt": 0
},
"token": {
"Character": {
"value": "4"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 133,
"end": 138,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "h4",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 139,
"end": 143,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "h5",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"token": {
"Character": {
"value": "T"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 144,
"end": 145,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 151,
"end": 152,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"token": {
"Character": {
"value": "e"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"token": {
"Character": {
"value": "d"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 155,
"end": 156,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"token": {
"Character": {
"value": "n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"token": {
"Character": {
"value": "5"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 160,
"end": 165,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "h5",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 166,
"end": 170,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "h6",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"token": {
"Character": {
"value": "T"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 172,
"end": 173,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 178,
"end": 179,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 179,
"end": 180,
"ctxt": 0
},
"token": {
"Character": {
"value": "e"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 180,
"end": 181,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 181,
"end": 182,
"ctxt": 0
},
"token": {
"Character": {
"value": "d"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 183,
"end": 184,
"ctxt": 0
},
"token": {
"Character": {
"value": "n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 184,
"end": 185,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"token": {
"Character": {
"value": "6"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 187,
"end": 192,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "h6",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 193,
"end": 194,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 194,
"end": 201,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "body",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 201,
"end": 202,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 202,
"end": 209,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "html",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 209,
"end": 210,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
}
]
}