From 8c1549d57ca4c7222608c474e3a8be97fae4b16a Mon Sep 17 00:00:00 2001 From: renzhiyuan <465386466@qq.com> Date: Thu, 24 Jul 2025 18:28:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E4=B8=BA=E5=AD=97=E8=8A=82js?= =?UTF-8?q?on=EF=BC=8C=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ai.go b/ai.go index 50b46e4..96e2fb7 100644 --- a/ai.go +++ b/ai.go @@ -19,7 +19,7 @@ func ExcelMatch(ctx context.Context, selfExcelHeader, matchToExcelHeader []strin var char = v char, isChange := cleanString(v) if isChange { - specialChars[v] = char + specialChars[char] = v } withOutSpecialMatchToExcelHeader[k] = char } @@ -47,7 +47,7 @@ func ExcelMatch(ctx context.Context, selfExcelHeader, matchToExcelHeader []strin func cleanString(s string) (out string, isChange bool) { var result []rune for _, ch := range s { - if unicode.IsLetter(ch) || unicode.IsDigit(ch) || unicode.IsSpace(ch) || unicode.IsPunct(ch) { + if (unicode.IsLetter(ch) || unicode.IsDigit(ch) || unicode.IsSpace(ch) || unicode.IsPunct(ch)) && (ch != '*') { result = append(result, ch) } else { isChange = true