Fix check for \i?clip in cleantags. Updates #1450.
Originally committed to SVN as r6452.
This commit is contained in:
parent
26f3bb26ba
commit
fcffb010b9
1 changed files with 3 additions and 3 deletions
|
@ -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…
Reference in a new issue