From 4d0245f1a5fe3617ddce47b2477a06568e479b32 Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 15 Apr 2023 01:00:43 +0900 Subject: [PATCH] allow acute accent --- packages/client/src/pages/user/home.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/client/src/pages/user/home.vue b/packages/client/src/pages/user/home.vue index ef5a6544d5..84ee4b0a30 100644 --- a/packages/client/src/pages/user/home.vue +++ b/packages/client/src/pages/user/home.vue @@ -355,9 +355,18 @@ const age = $computed(() => { const timeForThem = $computed(() => { const maybeCityNames = [ props.user.location!, - props.user.location!.replace(/[^A-Za-z].*/, ""), - props.user.location!.replace(/[^A-Za-z\-\'\.].*/, ""), - props.user.location!.replace(/[^A-Za-z0-9\-\'\.\s].*/, ""), + props.user.location!.replace( + /[^A-Za-zÁĆÉǴÍḰĹḾŃÓṔŔŚÚÝŹáćéǵíḱĺḿńóṕŕśúýź].*/, + "" + ), + props.user.location!.replace( + /[^A-Za-zÁĆÉǴÍḰĹḾŃÓṔŔŚÚÝŹáćéǵíḱĺḿńóṕŕśúýź\-\'\.].*/, + "" + ), + props.user.location!.replace( + /[^A-Za-z0-9ÁĆÉǴÍḰĹḾŃÓṔŔŚÚÝŹáćéǵíḱĺḿńóṕŕśúýź\-\'\.\s].*/, + "" + ), ]; for (const city of maybeCityNames) {