From 4fc833c84cfbb6e3e08c30efc6ad4d1437eefef7 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 ef5a6544d..84ee4b0a3 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) {