fix(router/atc): uri replace didn't works well if contains the optional group
Summary
URI captures are not usable if the first capture is an empty string.
Checklist
- [x] The Pull Request has tests
- [x] A changelog file has been created under
changelog/unreleased/kongorskip-changeloglabel added on PR if changelog is unnecessary. README.md - [ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE
Ticket reference
Fix #13014, KAG-4474
This PR is ready to review now. Could you please take a look while you have time? I'm not sure if I get your point correctly.
@StarlightIbuki Thank you, I did enable the .editorconfig plugin in my IDE, but it seems didn't work correctly. Will take care of this next time.
@StarlightIbuki @chronolaw Please take a look at the last commit again.
@dndx @nowNick @ADD-SP @samugi Would you mind taking a look again?
Successfully created cherry-pick PR for master:
- https://github.com/kong/kong-ee/pull/9253
Thanks all for your help!