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

557 lines
14 KiB
JSON
Raw Normal View History

2022-04-07 08:12:54 +03:00
{
"type": "Document",
"span": {
"start": 0,
"end": 719,
2022-04-07 08:12:54 +03:00
"ctxt": 0
},
"mode": "no-quirks",
2022-04-07 08:12:54 +03:00
"children": [
{
"type": "DocumentType",
2022-04-07 08:12:54 +03:00
"span": {
"start": 0,
"end": 15,
"ctxt": 0
},
"name": "html",
"publicId": null,
"systemId": null
},
{
"type": "Element",
"span": {
"start": 16,
"end": 719,
2022-04-07 08:12:54 +03:00
"ctxt": 0
},
"tagName": "html",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "lang",
"value": "en"
}
],
"children": [
{
"type": "Element",
"span": {
"start": 33,
"end": 68,
"ctxt": 0
},
"tagName": "head",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 39,
"end": 44,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 44,
"end": 59,
"ctxt": 0
},
"tagName": "title",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 51,
"end": 59,
"ctxt": 0
},
"value": "Document"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "\n"
}
],
"content": null
},
{
"type": "Text",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "\n"
},
{
"type": "Element",
"span": {
"start": 76,
"end": 719,
"ctxt": 0
},
"tagName": "body",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [],
"children": [
{
"type": "Text",
"span": {
"start": 82,
"end": 87,
"ctxt": 0
},
"value": "\n "
},
2022-04-07 08:12:54 +03:00
{
"type": "Element",
"span": {
"start": 87,
"end": 170,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"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": 174,
"end": 179,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 179,
"end": 217,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "add sort keys createSorter"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 221,
"end": 226,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 226,
"end": 265,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "sprite sprite-{{sprite}}"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 272,
"end": 277,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 277,
"end": 316,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "{{sprite}}-sprite sprite"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 323,
"end": 328,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 328,
"end": 367,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "sprite-{{sprite}}-sprite"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 374,
"end": 379,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 379,
"end": 404,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "{{sprite}}"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 411,
"end": 416,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 416,
"end": 439,
"ctxt": 0
},
"tagName": "span",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "{{sprite}}"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 446,
"end": 451,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 451,
"end": 462,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": null
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 468,
"end": 473,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 473,
"end": 556,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"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": 562,
"end": 567,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 567,
"end": 640,
"ctxt": 0
},
"tagName": "a",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "moo <!-- htmlmin:ignore -->bar<!-- htmlmin:ignore --> foo baz"
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 644,
"end": 649,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 649,
"end": 664,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "="
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 670,
"end": 675,
"ctxt": 0
},
"value": "\n "
},
{
"type": "Element",
"span": {
"start": 675,
"end": 696,
"ctxt": 0
},
"tagName": "div",
"namespace": "http://www.w3.org/1999/xhtml",
"attributes": [
{
"type": "Attribute",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"namespace": null,
"prefix": null,
"name": "class",
"value": "= = = ="
}
],
"children": [],
"content": null
},
{
"type": "Text",
"span": {
"start": 702,
"end": 719,
"ctxt": 0
},
"value": "\n\n\n"
2022-04-07 08:12:54 +03:00
}
],
"content": null
2022-04-07 08:12:54 +03:00
}
],
"content": null
2022-04-07 08:12:54 +03:00
}
]
}