Repository navigation
fix(resolution): retain JSX render links after child text - #509
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JSX child components now keep their render links when plain text or a newline comes before the tag, such as
<p>Sign in <Link /></p>.The existing JSX lexer blanks child text while preserving offsets and line breaks. The tag classifier therefore no longer mistakes the preceding word for a type name. Type arguments, comments and quoted examples retain their existing false-positive controls.
The known-failure case becomes passing text/newline regressions, and the backtick fixture uses its natural
Press `Ctrl` and <Kbd>text again. README, the framework guide, coverage notes and changelog describe the corrected behavior.Validation: both new cases failed on the pre-fix source. The focused JSX, React Router import and kernel-golden suites passed 57/57; golden dumps unchanged. Svelte precision retained its known-absent edge (1/1). Test floor, agent-doc and whitespace guards passed. Full Node 24 suite passed: 726/726 files, 9,120 passed and 39 skipped. TypeScript/assets/viewer build and kernel-rule guard passed.
README “About this fork” rows checked: parsing/languages behavior updated; no language inventory or historical timing number changed. Related earlier JSX work: #501 and #504; this fixes the remaining plain-text child-tag case.
Summary by cubic
JSX child components now keep their render links when plain text or a newline precedes the tag, such as
<p>Sign in <Link /></p>. Previously the word before the tag was misread as a type name or comparison, so the render link was dropped.The JSX lexer now blanks child text while preserving offsets and line breaks, so the tag classifier recognizes the tag correctly. Type arguments, comments, and quoted examples keep their existing false-positive controls, and the previous known-failure test now passes with the natural backtick text.
Written for commit c78b1b0. Summary will update on new commits.
Summary by CodeRabbit