swc/crates/swc_html_parser/tests/fixture/class-attribute/output.json

527 lines
10 KiB
JSON
Raw Normal View History

2022-04-07 08:12:54 +03:00
{
"type": "Document",
"span": {
"start": 0,
"end": 521,
"ctxt": 0
},
"children": [
{
"type": "TokenAndSpan",
"span": {
"start": 0,
"end": 83,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "a",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "a",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z",
"raw_value": "\"0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z\""
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 83,
"end": 87,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "a",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "a",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 87,
"end": 88,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 88,
"end": 126,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "a",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "a",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "add sort keys createSorter",
"raw_value": "\"add sort keys createSorter\""
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 126,
"end": 130,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "a",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "a",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 131,
"end": 170,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "sprite sprite-{{sprite}}",
"raw_value": "\"sprite sprite-{{sprite}}\""
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 170,
"end": 177,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 178,
"end": 217,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "{{sprite}}-sprite sprite",
"raw_value": "\"{{sprite}}-sprite sprite\""
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 217,
"end": 224,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 225,
"end": 264,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "sprite-{{sprite}}-sprite",
"raw_value": "\"sprite-{{sprite}}-sprite\""
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 264,
"end": 271,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 272,
"end": 297,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "{{sprite}}",
"raw_value": "\"{{sprite}}\""
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 297,
"end": 304,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 304,
"end": 305,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 305,
"end": 328,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "{{sprite}}",
"raw_value": "{{sprite}}"
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 328,
"end": 335,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "span",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "span",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 335,
"end": 336,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 336,
"end": 347,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "div",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "div",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": null,
"raw_value": null
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 347,
"end": 353,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "div",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "div",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 353,
"end": 354,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 354,
"end": 437,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "div",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "div",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "nav_sv_fo_v_column <#=(j === 0) ? 'nav_sv_fo_v_first' : '' #> foo_bar",
"raw_value": "\"nav_sv_fo_v_column <#=(j === 0) ? 'nav_sv_fo_v_first' : '' #> foo_bar\""
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 437,
"end": 443,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "div",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "div",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 443,
"end": 444,
"ctxt": 0
},
"token": {
"Character": {
2022-04-08 12:19:58 +03:00
"value": "\n",
"raw": "\n"
2022-04-07 08:12:54 +03:00
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 444,
"end": 517,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "a",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "a",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": [
{
"name": "class",
2022-04-08 12:19:58 +03:00
"raw_name": "class",
"value": "moo <!-- htmlmin:ignore -->bar<!-- htmlmin:ignore --> foo baz",
"raw_value": "\"moo <!-- htmlmin:ignore -->bar<!-- htmlmin:ignore --> foo baz\""
2022-04-07 08:12:54 +03:00
}
]
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 517,
"end": 521,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "a",
2022-04-08 12:19:58 +03:00
"raw_tag_name": "a",
2022-04-07 08:12:54 +03:00
"self_closing": false,
"attributes": []
}
}
}
]
}