Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Dec 11, 2025

Fixes #182.

@webJose webJose requested a review from Copilot December 11, 2025 16:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue (#182) where the rest parameter regex pattern was incorrectly matching similar text in paths. The fix ensures that rest parameters only consume path segments starting with a forward slash.

Key changes:

  • Updated rest parameter regex pattern to require a leading slash (\\/.* instead of .*)
  • Updated all test expectations to reflect the new pattern behavior
  • Added new test cases to verify the fix handles edge cases correctly

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/lib/kernel/RouteHelper.svelte.ts Modified rest parameter regex replacement to require leading slash
src/lib/kernel/RouteHelper.svelte.test.ts Updated existing test expectations and added new test cases for edge cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@webJose webJose merged commit f9d41ea into main Dec 11, 2025
1 check passed
@webJose webJose deleted the JP/FixRest branch December 11, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RouterEngine route regex matches paths with similar names

2 participants