You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backbone has a syntax for optional parts of a route, for example: foo(/:bar) will match foo and foo/baz. Right now the Giraffe.Router#_reverseHash function doesn't support these parameters.
The text was updated successfully, but these errors were encountered:
Sorry for not documenting this - we were aware of the limitation when writing the function but didn't have the time to do it correctly. A PR would be welcome; I'll try to find the time to look into it after the holidays.
This is a partial fix. Optional params, like '/foo(/:bar)', should now work, but optional static paths, like '/foo(/bar)', remain broken for Router#isCaused. Fixing it looks like it requires some significant refactoring - a PR would be welcome if you find yourself needing it. Router#cause can't be fixed without manually specifying whether or not to include each optional part, which doesn't seem feasible.
Backbone has a syntax for optional parts of a route, for example:
foo(/:bar)
will matchfoo
andfoo/baz
. Right now theGiraffe.Router#_reverseHash
function doesn't support these parameters.The text was updated successfully, but these errors were encountered: