-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Route: Require exact matches when parsing
Instead of relying on route ordering, a parse should only be successful if no path elements are left. This reverts to the behaviour pre-v0.2.0. URLs will still parse if they contain parameters or a fragment that were not specified in the route. However, this also can be restricted with the newly introduced function `parseArgsStrict()`. In cases where remaining path elements or parameters are expected, the matchers `Elems` and `Params` were added. Further changes include renaming of two `Route` functions: 1. `parse()` -> `parseArgs()` 2. `parseInternal()` -> `parse()` Since these are potentially breaking changes and may require developers to update their routing tables, the version number was increased to v0.3.0. Closes #37.
- Loading branch information
Showing
11 changed files
with
330 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,4 +64,4 @@ object PathParser { | |
|
||
Path(path, args, fragment) | ||
} | ||
} | ||
} |
Oops, something went wrong.