routify icon indicating copy to clipboard operation
routify copied to clipboard

Route parameters capture too much: `test[slug].svelte` slug is "testfoo" not "foo"

Open tv42 opened this issue 3 years ago • 9 comments

routify 1.9.7

create src/pages/test[slug].svelte:

<script>
 import { params } from '@sveltech/routify'

 export let slug;
</script>

<p>slug {JSON.stringify(slug)}</p>

<p>params {JSON.stringify($params)}</p>

visit /testfoo, observe output

slug "testfoo"

params {"slug":"testfoo"}

Expected "foo" for both.

tv42 avatar Aug 12 '20 18:08 tv42