Commit graph

9 commits

Author SHA1 Message Date
Greg Johnston
ae1de88916 Revert "Better handling for trailing slashes. (#2154) (#2172)"
This reverts commit 1eaf886481.
2024-01-19 10:27:38 -05:00
Cody Casterline
1eaf886481
Better handling for trailing slashes. (#2154) (#2172)
* retain trailing slashes in paths but leave matching trail-slash-insensitive

* fix: Allow trailing slashes to remain in leptos_path.

* Better handling for trailing slashes. (#2154)

This adds a trailing_slash option to <Router> and <Route>.

By default, this option is backward compatible with current Leptos
behavior, but users can opt into two new modes for handling trailing
slashes.

* cargo fmt

* Fix redirect routes for wildcard patterns.

* Clippy fixies

* (Re)Reduce the scope of PossibleBranchContext's internals.

* Test real code, not copied code.

* Test TrailingSlash redirects.

* Fixes and more tests for matching "" && "/".

This path is the exception to the rule and *should* be treated
as equivalent regardless of its trailing slash.

* cargo fmt

---------

Co-authored-by: Tadas Dailyda <tadas@dailyda.com>
2024-01-11 13:51:31 -08:00
Greg Johnston
6014a70d0d
fix: support complete URLs in <A/> and <Form/> (closes #2076) (#2096) 2023-12-01 19:20:43 -05:00
Greg Johnston
8eed999611
fix: properly handle trailing / in splat routes (closes #1764) (#1890) 2023-10-14 08:37:31 -04:00
Igor Shevchenko
98a9ec8335
chore(docs): fix a few typos (#756) 2023-03-27 20:06:34 -04:00
g-re-g
3648af0d9d
fix: correct scheme handling in router, and improve matching code by removing regexes (#569) 2023-02-26 07:15:14 -05:00
Clemente
dbccf525ac Added some tests 2023-01-21 11:17:25 -03:00
Greg Johnston
ef067f18e1 Fix router tests when no features enabled 2023-01-07 07:36:27 -05:00
Greg Johnston
05ffd8c989 Add all the missing router tests 2023-01-06 12:48:45 -05:00