Fix handling of inverting flags
This commit is contained in:
parent
0b31ec58da
commit
a0a5829d84
@ -183,16 +183,17 @@ local PAGES = {
|
|||||||
local function composeSortFuncs(...)
|
local function composeSortFuncs(...)
|
||||||
local funcs = {...}
|
local funcs = {...}
|
||||||
|
|
||||||
|
local invert = false
|
||||||
local compose = nil
|
local compose = nil
|
||||||
for i=#funcs,1,-1 do
|
for i=#funcs,1,-1 do
|
||||||
local current = funcs[i]
|
local current = funcs[i]
|
||||||
local invert = false
|
|
||||||
if type(current) == "boolean" then
|
if type(current) == "boolean" then
|
||||||
invert = current
|
invert = current
|
||||||
i = i - 1
|
goto continue
|
||||||
current = funcs[i]
|
|
||||||
end
|
end
|
||||||
compose = current(invert, compose)
|
compose = current(invert, compose)
|
||||||
|
invert = false
|
||||||
|
::continue::
|
||||||
end
|
end
|
||||||
return compose
|
return compose
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user