mirror of
https://github.com/d0zingcat/rime_wanxiang.git
synced 2026-05-20 23:26:44 +00:00
fix: 移除声调回退中多余的字符
This commit is contained in:
@@ -10,7 +10,7 @@ local wanxiang = require("wanxiang")
|
||||
-- 将目标字符的连续段压缩为“最后一个字符”
|
||||
local function compress_runs_keep_last(text)
|
||||
local changed = false
|
||||
local out = text:gsub('([:"<>7890])([:"<>7890]+)', function(_, tail)
|
||||
local out = text:gsub('([7890])([7890]+)', function(_, tail)
|
||||
changed = true
|
||||
return tail:sub(-1)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user