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

formatter: render numeric character references like named ones #490

Merged
merged 2 commits into from
Oct 8, 2022

Conversation

gibson042
Copy link
Contributor

Ref #488

@bakkot
Copy link
Contributor

bakkot commented Oct 7, 2022

This will render some things it probably shouldn't - e.g.   (no-break space), which is visually indistinguishable from a regular space character in most editors.

I'd like to filter on the same regex as we use for regular entities: i.e. don't render entities which match /\p{White_Space}|\p{DI}|\p{gc=M}|\p{gc=C}/u. I can push a commit with that change sometime if you don't get to it before me.

(It might actually be nice to translate numeric forms of entities which we want to keep in entity form into their corresponding named entity, when they have a name - so &#A0; into   - but that doesn't need to happen in this PR.)

@bakkot bakkot merged commit 3a4b91d into tc39:main Oct 8, 2022
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.

2 participants