Files
Nicolò RibaudoandGitHub 2ce6340776 Remove length restriction from JSX entities, and ignore Object.prototype (#14327)
* Allow any length in unicode CP jsx entities

* Add failing test

* Don't access entities from Object.prototype

* Add `&#0_0;` test

* Fix `�` parsing
2022-03-06 10:00:25 +01:00

53 lines
2.1 KiB
JSON

{
"type": "File",
"start":0,"end":61,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":4,"index":61}},
"program": {
"type": "Program",
"start":0,"end":61,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":4,"index":61}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":61,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":4,"index":61}},
"expression": {
"type": "JSXElement",
"start":0,"end":61,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":4,"index":61}},
"openingElement": {
"type": "JSXOpeningElement",
"start":0,"end":3,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":3,"index":3}},
"name": {
"type": "JSXIdentifier",
"start":1,"end":2,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":2,"index":2}},
"name": "a"
},
"attributes": [],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start":57,"end":61,"loc":{"start":{"line":7,"column":0,"index":57},"end":{"line":7,"column":4,"index":61}},
"name": {
"type": "JSXIdentifier",
"start":59,"end":60,"loc":{"start":{"line":7,"column":2,"index":59},"end":{"line":7,"column":3,"index":60}},
"name": "a"
}
},
"children": [
{
"type": "JSXText",
"start":3,"end":57,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":7,"column":0,"index":57}},
"extra": {
"rawValue": "\n &amp\n &ampa;\n &amp ;\n &xamp;\n &#0_0;\n",
"raw": "\n &amp\n &ampa;\n &amp ;\n &xamp;\n &#0_0;\n"
},
"value": "\n &amp\n &ampa;\n &amp ;\n &xamp;\n &#0_0;\n"
}
]
}
}
],
"directives": []
}
}