Conversation
WalkthroughThe change modifies the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/main/java/com/flowingcode/vaadin/addons/demo/TabbedDemo.java`:
- Around line 205-214: The code currently applies leading-digit normalization on
the raw route string (.map(...replaceFirst("^[0-9]", "_$0"))) before sanitizing
segments, which can let a later sanitized segment still start with a digit;
change the logic so digit-prefixing happens after sanitization of each segment
and only for the first non-empty sanitized segment: in the block that iterates
segments (route.split("/+")), perform the sanitize steps
(replaceAll("[^a-zA-Z0-9_-]+", "-").replaceAll("^-+|-+$", "")), skip empty
segments, and when appending the first non-empty sanitized segment to prefix and
calling demo.addClassName(...) check if that sanitized segment startsWith a
digit and if so prepend '_' to that segment (and to the prefix) before
appending; leave subsequent segments untouched except for the existing '-'
separator handling.
|
SONARCLOUD:
The processed strings are obtained from the |




Summary by CodeRabbit