fix: Convert numbers to hexadecimal inside Unicode escape sequences#24
fix: Convert numbers to hexadecimal inside Unicode escape sequences#24slevithan merged 1 commit intoslevithan:mainfrom
Conversation
|
Nice catch! And thanks for the PR!
That's clever, but relying on this will lead to confusing errors. Ex: If given
That's a good idea (since I don't love relying on the generated error), but if I decide to change this I can do it in a follow up diff to avoid holding back your PR.
No problem. Will do! |
|
I've now added additional tests and split Also, I realized that converting to hex within enclosed
There are a few others starting with a lowercase letter that JS supports:
As far as I know, that's all of them. |
|
Published in v4.3.3. |
Feel free to suggest a better comment that you feel comfortable with.
For simplicity, this PR doesn’t distinguish between Unicode and Unicode property escape sequences. It works by the fact that, among the currently allowed
LoneUnicodePropertyNameOrValue, onlygc,scandscxstart with a lowercase character and none of them are purelya~f. Don’t hesitate to close this PR if you would like to achieve this by separatingENCLOSED_TOKENtoP_TOKENandU_TOKENinstead.Only minimal test cases are written, I’d love it if you could take over and include more.