mirror of
https://github.com/iDvel/rime-ice.git
synced 2026-05-14 00:30:37 +08:00
refactor: lua; close #352
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user