question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ending slash is output for pattern without ending slash

See original GitHub issue

Hi! I decided to build own router and stuck on small mismatch with path-to-regexp behaviour.

I expect /:page matching /dashboard/activities do not include slash in the end of dashboard in exec array. https://codesandbox.io/s/intelligent-fermat-mwv42

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
lukeedcommented, Jun 22, 2019

Everything in the Polka & Navaid worlds still work with this change 😃

1reaction
lukeedcommented, Jun 22, 2019

Understood, just making sure.

I still have to investigate some dependents, but I just pushed the code (and way more tests) to #6

I have to step out for a little bit, but if you can verify that that PR behaves as expected, would be appreciated. Back soon 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Return string without trailing slash - Stack Overflow
Try this: function someFunction(site) { return site.replace(/\/$/, ""); }.
Read more >
To slash or not to slash | Google Search Central Blog
This behavior is beneficial because it reduces duplicate content. In the particular case of redirects to trailing slash URLs, our search results will...
Read more >
Deprecate trailing slash match and change default value from ...
Whether to match to URLs irrespective of the presence of a trailing slash. If enabled a method mapped to "/users" also matches to...
Read more >
Remove trailing slash from links - WordPress.org
I started building a website with permalinks using trailing slash. But the website needs to be without trailing slashes. I already changed permalinks...
Read more >
IIS Reverse Proxy Fails without Trailing Slash - Server Fault
If I go to example.com/app/ it works as expected. However, if I go to example.com/app (without the trailing slash), it results in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found