{"action":"created","issue":{"url":"https://api.github.com/repos/pillarjs/path-to-regexp/issues/116","repository_url":"https://api.github.com/repos/pillarjs/path-to-regexp","labels_url":"https://api.github.com/repos/pillarjs/path-to-regexp/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/pillarjs/path-to-regexp/issues/116/comments","events_url":"https://api.github.com/repos/pillarjs/path-to-regexp/issues/116/events","html_url":"https://github.com/pillarjs/path-to-regexp/issues/116","id":253145490,"number":116,"title":"Trailing Delimiters and the Root","user":{"login":"pshrmn","id":1127037,"avatar_url":"https://avatars0.githubusercontent.com/u/1127037?v=4","gravatar_id":"","url":"https://api.github.com/users/pshrmn","html_url":"https://github.com/pshrmn","followers_url":"https://api.github.com/users/pshrmn/followers","following_url":"https://api.github.com/users/pshrmn/following{/other_user}","gists_url":"https://api.github.com/users/pshrmn/gists{/gist_id}","starred_url":"https://api.github.com/users/pshrmn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pshrmn/subscriptions","organizations_url":"https://api.github.com/users/pshrmn/orgs","repos_url":"https://api.github.com/users/pshrmn/repos","events_url":"https://api.github.com/users/pshrmn/events{/privacy}","received_events_url":"https://api.github.com/users/pshrmn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-08-27T06:53:15Z","updated_at":"2017-08-27T20:20:40Z","closed_at":null,"body":"Previously, the root pathname (`/`) would match everything when `end = false`. With the release of `v2.0.0`, that is no longer the case.\r\n\r\n```js\r\n// 1.7.0\r\nconst re1 = PathToRegexp('/', [], { end: false });\r\nre1.exec('/'); // [\"/\", index: 0, input: \"/\"]\r\nre1.exec('/test'); // [\"\", index: 0, input: \"/test\"]\r\n\r\n// 2.0.0\r\nconst re2 = PathToRegexp('/', [], { end: false });\r\nre2.exec('/'); // [\"/\", index: 0, input: \"/\"]\r\nre2b.exec('/test'); // null\r\n```\r\n\r\nI believe that this is related to the trailing delimiters change in v2, but to be perfectly honest, browsing through the diff for https://github.com/pillarjs/path-to-regexp/commit/9d4cbd91698529e719fc00d20dc87aa382db54ee, I wasn't positive where this change was made.\r\n\r\nI was looking into updating React Router to use v2, but having `/` match any pathname is a pretty core requirement. I'm not sure if the current implementation would be considered a bug or if this is the desired behavior. Any feedback would be appreciated."},"comment":{"url":"https://api.github.com/repos/pillarjs/path-to-regexp/issues/comments/325221863","html_url":"https://github.com/pillarjs/path-to-regexp/issues/116#issuecomment-325221863","issue_url":"https://api.github.com/repos/pillarjs/path-to-regexp/issues/116","id":325221863,"user":{"login":"blakeembrey","id":1088987,"avatar_url":"https://avatars0.githubusercontent.com/u/1088987?v=4","gravatar_id":"","url":"https://api.github.com/users/blakeembrey","html_url":"https://github.com/blakeembrey","followers_url":"https://api.github.com/users/blakeembrey/followers","following_url":"https://api.github.com/users/blakeembrey/following{/other_user}","gists_url":"https://api.github.com/users/blakeembrey/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeembrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeembrey/subscriptions","organizations_url":"https://api.github.com/users/blakeembrey/orgs","repos_url":"https://api.github.com/users/blakeembrey/repos","events_url":"https://api.github.com/users/blakeembrey/events{/privacy}","received_events_url":"https://api.github.com/users/blakeembrey/received_events","type":"User","site_admin":false},"created_at":"2017-08-27T20:20:40Z","updated_at":"2017-08-27T20:20:40Z","body":"I can also make it a flag easy enough (e.g. \"strip trailing delimiter path match\")."}}
{"actor":{"display_login":"blakeembrey"}}