svelte-router
svelte-router copied to clipboard
change regex pattern for dynamic routes to accept hyphens / underscores
Sorry I didn't leave much of a message! Anyhow, I just updated the regex pattern to allow dynamic routes like /about/about-us which would look like this in the router config:
const router = new SvelteRouter({
routes: {
'/about/:subpage': {
Component: SubComponent,
props: {store}
}
}
}
Thanks for your consideration! If this isn't within your guidelines, it would be a great feature to have. Thanks again.