99
99
--[[ Remove any spaces within parenteses within override blocks except for \clip tags ]]
100
local comb = function(a,b,c,d,e)
101
if c ~= "\\i?clip" or d:sub(-1):find("[,%({]") or e:sub(1,1):find("[,%)}]") then return a..b..d..e
100
local comb = function(a,b,c,d,e)
101
if (c ~= "\\clip" and c ~= "\\iclip") or d:sub(-1):find("[,%({]") or e:sub(1,1):find("[,%)}]") then return a..b..d..e
105
105
text, replaced2 = string.gsub(text, "({[^}\\]*)([^}%s]*(\\[^%(}\\%s]*))%s*(%([^%s%)}]*)%s+([^}]*)", comb)