fix(language-server): allow element names with underscore+digit prefix#2845
Conversation
…llowed by digit Update IdTerminal regex to accept identifiers like `_1password`, `__1service`, `_123` which were incorrectly rejected despite matching the documented naming rules. Fixes #2836 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: d4a51b1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughFixed a parser inconsistency where element identifiers starting with an underscore followed by a digit (e.g., Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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 |
Summary
IdTerminalregex to accept identifiers starting with underscore(s) followed by a digit (e.g._1password,__1service,_123)/[_]*[a-zA-Z][-\w]*/required a letter immediately after underscores, which was more restrictive than documented/([a-zA-Z]|_+[a-zA-Z0-9])[-\w]*/correctly allows both_<letter>and_<digit>startsFixes #2836
Test plan
_1password,__1service,_123element names🤖 Generated with Claude Code