swc/crates/swc_html_parser/tests/fixture/attribute/class/output.json
2022-05-17 08:23:24 +00:00

557 lines
14 KiB
JSON

{
"type": "Document",
"span": {
"start": 1,
"end": 720,
"ctxt": 0
},
"mode": "no-quirks",
"children": [
{
"type": "DocumentType",
"span": {
"start": 1,
"end": 16,
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null
},
{
"type": "Element",
"span": {
"start": 17,
"end": 720,
"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",
"value": "en"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 34,
"end": 69,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 40,
"end": 45,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 45,
"end": 60,
"ctxt": 0
},
"tagName": "title",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 52,
"end": 60,
"ctxt": 0
},
"value": "Document"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 77,
"end": 720,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 83,
"end": 88,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 88,
"end": 171,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 91,
"end": 170,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"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"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 175,
"end": 180,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 180,
"end": 218,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 183,
"end": 217,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "add sort keys createSorter"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 222,
"end": 227,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 227,
"end": 266,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 233,
"end": 265,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "sprite sprite-{{sprite}}"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 273,
"end": 278,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 278,
"end": 317,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 284,
"end": 316,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "{{sprite}}-sprite sprite"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 324,
"end": 329,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 329,
"end": 368,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 335,
"end": 367,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "sprite-{{sprite}}-sprite"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 375,
"end": 380,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 380,
"end": 405,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 386,
"end": 404,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "{{sprite}}"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 412,
"end": 417,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 417,
"end": 440,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 423,
"end": 439,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "{{sprite}}"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 447,
"end": 452,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 452,
"end": 463,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 457,
"end": 462,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": null
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 469,
"end": 474,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 474,
"end": 557,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 479,
"end": 556,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "nav_sv_fo_v_column <#=(j === 0) ? 'nav_sv_fo_v_first' : '' #> foo_bar"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 563,
"end": 568,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 568,
"end": 641,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 571,
"end": 640,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "moo <!-- htmlmin:ignore -->bar<!-- htmlmin:ignore --> foo baz"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 645,
"end": 650,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 650,
"end": 665,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 655,
"end": 664,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "="
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 671,
"end": 676,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 676,
"end": 697,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 681,
"end": 696,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "= = = ="
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 703,
"end": 720,
"ctxt": 0
},
"value": "\n\n\n"
}
],
"content": null
}
],
"content": null
}
]
}