mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Fix check for \i?clip in cleantags. Updates #1450.
Originally committed to SVN as r6452.
This commit is contained in:
parent
26f3bb26ba
commit
fcffb010b9
@ -97,9 +97,9 @@ function cleantags(text)
|
||||
end
|
||||
|
||||
--[[ Remove any spaces within parenteses within override blocks except for \clip tags ]]
|
||||
local comb = function(a,b,c,d,e)
|
||||
if c ~= "\\i?clip" or d:sub(-1):find("[,%({]") or e:sub(1,1):find("[,%)}]") then return a..b..d..e
|
||||
else return a..b..d..string.char(2)..e end
|
||||
local comb = function(a,b,c,d,e)
|
||||
if (c ~= "\\clip" and c ~= "\\iclip") or d:sub(-1):find("[,%({]") or e:sub(1,1):find("[,%)}]") then return a..b..d..e
|
||||
else return a..b..d..string.char(2)..e end
|
||||
end
|
||||
repeat
|
||||
text, replaced2 = string.gsub(text, "({[^}\\]*)([^}%s]*(\\[^%(}\\%s]*))%s*(%([^%s%)}]*)%s+([^}]*)", comb)
|
||||
|
Loading…
x
Reference in New Issue
Block a user