refactor: lua; close #352

This commit is contained in:
Dvel
2023-06-15 22:21:06 +08:00
parent ab066356f8
commit 314b3621af
5 changed files with 65 additions and 62 deletions

View File

@@ -11,16 +11,9 @@ local function add_spaces(s)
return s
end
-- 是否同时包含中文和英文数字
local function is_mixed_cn_en_num(s)
-- 检查是否含有中文
if not s:find("([\228-\233][\128-\191]-)") then
return false
end
-- 检查是否含有英文或数字
if not s:find("[%a%d]") then
return false
end
return true
return s:find("([\228-\233][\128-\191]-)") and s:find("[%a%d]")
end
local function cn_en_spacer(input, env)