next-routes
next-routes copied to clipboard
Why characters like š aren't matched?
Not sure if this is bug or support request. I can't seem to catch 'š' character with routes. So path like /tsitaadid/autorid/š doesn't match the rule.
Whatever I try in routes.js, even adding š character, it just skips the first route. Ascii chars work just fine.
module.exports = routes()
.add('quotes/authors/%author_last_name_first_char', '/tsitaadid/autorid/(.)', 'quotes/authors')
.add('quotes/authors/%author_name', '/tsitaadid/autorid/:author_name/:quote_id?', 'quotes/author-quotes');
or
module.exports = routes()
.add('quotes/authors/%author_last_name_first_char', '/tsitaadid/autorid/(\\w{1})', 'quotes/authors')
.add('quotes/authors/%author_name', '/tsitaadid/autorid/:author_name/:quote_id?', 'quotes/author-quotes');
or
module.exports = routes()
.add('quotes/authors/%author_last_name_first_char', '/tsitaadid/autorid/š', 'quotes/authors')
.add('quotes/authors/%author_name', '/tsitaadid/autorid/:author_name/:quote_id?', 'quotes/author-quotes');
I guess I could pass it all to page and check there the length of last parameter in component.
Hello @hkirsman , maybe you need to check the path-to-regexp