-
-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hash router for urls ending with a hash #4730
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4730 +/- ##
==========================================
+ Coverage 87.75% 88.02% +0.27%
==========================================
Files 247 247
Lines 33656 33656
Branches 2201 2160 -41
==========================================
+ Hits 29536 29627 +91
+ Misses 3132 3053 -79
+ Partials 988 976 -12 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to review regexp changes...
I hope this won't break previous behavior when # was not present...
Please add a changelog item. |
All the existing tests run from a localhost/ url without a hashtag and they still pass, so that gives me some confidence nothing will break. To make sure the init behavior is as expected, I've added 5 more init tests for different url endings and a changelog |
Closes #4732
I've added a test for this, and a fix which is to modify the regex that recognize the hash. The section following the hashtag should be zero/one/more chars (.*), instead of one/more chars (.+).
Result before this PR:
http://localhost:9966/test/examples/cluster.html##3/40.67/-103.59
Result after this PR:
http://localhost:9966/test/examples/cluster.html#3/40.67/-103.59