Repository navigation
fix(id/web): Go to Line accepts only decimal digits (#2776) - #2777
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks
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.
Fixes #2776.
Go to Line's #712 strict validation still passed its value through bare
Number(), which silently reinterprets non-decimal spellings:0x10jumped to line 16,1e2to line 100,0b11to line 3,2.0to line 2 — the #832 residual pattern. Now only a run of decimal digits counts (theparseWorldSeedrule); anything else keeps the dialog open with the input selected and does not move the cursor.Verification (laptop, real source):
pkgs/id/web/src, happy-dom harness over a 120-line doc):0x10→pos 46 (line 16),1e2→pos 298 (line 100),0b11→pos 7 (line 3),2.0→pos 4 (line 2), all with the dialog closed; controls10and2.9behaved correctly.vitest run src/goto-line.test.ts— 31/31 pass, including four new invalid-input cases (0x2,0b10,2.0,+2) chosen because they reinterpret to the in-range line 2 on the 3-line fixture, so they fail on the old code.tsc --noEmitclean.Need help on this PR? Tag
@codesmith-botwith what you need.