fix(parser): update ident reference check in jsx#13819
fix(parser): update ident reference check in jsx#13819graphite-app[bot] merged 1 commit intomainfrom
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the JSX element name parsing logic to properly identify component references versus intrinsic elements, aligning with TypeScript's implementation. The key change is that non-ASCII characters are now always treated as component references rather than intrinsic elements.
- Updated the logic for determining JSX element references to match TypeScript's behavior
- Simplified ASCII character checking using
is_ascii_lowercase()instead of manual byte comparison - Added proper handling for non-ASCII Unicode identifiers as component references
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Instrumentation Performance ReportMerging #13819 will not alter performanceComparing Summary
Footnotes |
Merge activity
|
https://github.com/microsoft/typescript/blob/1c4083f4edc71cb1744a62013732e3c95d05a035/src/compiler/utilities.ts#L6189-L6192 This directly copies TS's implementation - non-ascii characters are always references (vs intrinsic elements) closes #13817
4e5f887 to
00e4477
Compare

https://github.com/microsoft/typescript/blob/1c4083f4edc71cb1744a62013732e3c95d05a035/src/compiler/utilities.ts#L6189-L6192
This directly copies TS's implementation - non-ascii characters are always references (vs intrinsic elements)
closes #13817