Reselim / roact-router

Declarative routing for Roact, based off of React Router
MIT License
22 stars 10 forks source link

Different paths incorrectly match when strings partially match #10

Open chriscerie opened 2 years ago

chriscerie commented 2 years ago

Since non-exact routes only use the caret anchor, partial string matches are unaccounted for. One example is the path /abc, for which a URL of /abcdef matches when it shouldn't.

local test = Path.new("/abc")

local match = test:match("/abcdef")

expect(match).to.equal(nil) -- Fails, got table