Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML and JSX spec #126

Closed
MathiasKandelborg opened this issue Aug 24, 2020 · 1 comment · Fixed by #136
Closed

HTML and JSX spec #126

MathiasKandelborg opened this issue Aug 24, 2020 · 1 comment · Fixed by #136
Labels
Impl Reality Reality that the spec does not capture

Comments

@MathiasKandelborg
Copy link

Hi there! Truly awesome work.

I have an issue with regards to unicode, html and encoding characters in general.

I've gotten to the point were I'm trying to find the disparity. It seems Babel works off of JSX spec, but I can't seem to find a list of characters JSX wants to encode. It might not be in the spec of JSX, but characters like < and { are also html entities and things get really messy when there's no standardization surrounding it.

@Huxpro Huxpro added the Impl Reality Reality that the spec does not capture label Feb 25, 2022
Huxpro added a commit that referenced this issue Mar 1, 2022
## Summary

Let's be faithful to the de-facto and document the HTML entity behaviors to the spec. Note that this is not about whether we should "drop this semantics or not", but about documenting the current behaviors that everyone has been living with for years.

### The Proposed Normative Change

I'm not aware of any practices specifying such transpiler/transform semantics in ECMA-262 so this is a really interesting attempt 🙂 So I ended up extending `Static Semantics: SV` which is the smartest way I can find to hack the semantics into the ECMA-262 spec. I think this should work and should be accurate enough. I'm curious on how implementors think about it though.

<del>I also intentionally left the set of supported HTML entities implementation-defined to allow either HTML4 or HTML5 set. This may be seen as a breaking change in some regard and **this is open to discuss here**. </del> We've reached consensus that only HTML4 entities are allowed.

This commit also close #133 by using `::` for characters which are supposed to be lexical grammars.

Close #126
Close #4

## Test Plan

open `index.html` and proof-read the spec ;)
@MathiasKandelborg
Copy link
Author

🥳 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impl Reality Reality that the spec does not capture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants