Skip to content

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Feb 1, 2024

Supersedes #267
Supersedes #277
Supersedes #284
Closes #290

cpmsmith and others added 7 commits January 31, 2024 20:19
JSX text and attributes support HTML character references (a.k.a.
entities), and don't support ECMAScript string escape sequences.

Although the [spec] calls it "historical" and threatens to change it,
it _is_ in the spec, and the spec is pretty stable at this point.

In changing this, I landed back on an idea that @maxbrunsfeld suggested
in a [PR review] some time ago: having separate `string` and
`jsx_string` nodes, and aliasing `jsx_string` to `string` for consumers'
convenience. At that time, having two different node types was deemed
unnecessary, but this adds a second, more substantive difference between
the two, so I've brought the idea back, and stopped allowing invalid
newlines in JS string literals, which is invalid in both JS and TS.

[spec]: https://facebook.github.io/jsx/#sec-jsx-string-characters
[PR review]: #140 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

let a /* >_< */ = 1

4 participants