[mugenizer] remove \fad tags from lines

This commit is contained in:
odrling 2019-08-10 16:58:54 +02:00
parent cbad47ab53
commit 0ca0e1613b

View file

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