diff --git a/karaoke-adjust-1sec.lua b/karaoke-adjust-1sec.lua index ad3a00d..df1b0e3 100644 --- a/karaoke-adjust-1sec.lua +++ b/karaoke-adjust-1sec.lua @@ -69,6 +69,19 @@ function adjust_1sec(subs, sel) end +function remove_tag(line, tag) + local expr = "^(.-{[^}]*)\\" .. tag .. "[^\\}]*(.*)" + while true do + before, after = line.text:match(expr) + if before == nil then + return line + else + line.text = cleantags(before .. after) + end + end +end + + function mugenizer(subs) local first = nil local styles_different = false @@ -107,6 +120,8 @@ function mugenizer(subs) if aegisub.progress.is_cancelled() then return end line = removeleadin(line) end + + line = remove_tag(line, "fad") end subs[i] = line