From a5dedf40ed3965f33fd670d3b6c1286d4721f05e Mon Sep 17 00:00:00 2001 From: zealotchen Date: Tue, 16 Apr 2024 17:49:20 +0800 Subject: [PATCH] feat(vue): fix vue replace   --- driver/js/packages/hippy-vue/src/util/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/js/packages/hippy-vue/src/util/index.ts b/driver/js/packages/hippy-vue/src/util/index.ts index 028be8a41fa..3c0eaf47e19 100644 --- a/driver/js/packages/hippy-vue/src/util/index.ts +++ b/driver/js/packages/hippy-vue/src/util/index.ts @@ -243,9 +243,9 @@ function whitespaceFilter(str: string) { // "trimWhitespace": default behavior is true. // It will trim leading / ending whitespace including all special unicode such as \xA0( ). if (!_Vue || typeof _Vue.config.trimWhitespace === 'undefined' || _Vue.config.trimWhitespace) { - return str.trim().replace(/Â/g, ' '); + return str.trim().replace(/( |Â)/g, ' '); } - return str.replace(/Â/g, ' '); + return str.replace(/( |Â)/g, ' '); } export {