fix: 移除声调回退中多余的字符

This commit is contained in:
amzxyz
2025-12-22 18:43:15 +08:00
parent 865f464f98
commit b90dabd847
2 changed files with 3 additions and 2 deletions

View File

@@ -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)