Modul:PageTree: Unterschied zwischen den Versionen

update
w>PerfektesChaos
(update)
w>PerfektesChaos
(update)
Zeile 1: Zeile 1:
--[=[ 2014-06-26
--[=[ 2014-07-13
 
Module:pageTree
Module:pageTree
]=]
]=]
Zeile 6: Zeile 7:


-- local globals
-- local globals
local Current = { }
local Current = { maxSub = 10 }
local Sort    = false
local Sort    = false
local Strings = { "segment", "self", "stamped", "subpager", "suppress" }
local Strings = { "segment", "self", "stamped", "subpager", "suppress" }
Zeile 265: Zeile 266:
     if type( r ) == "table" then
     if type( r ) == "table" then
         local s
         local s
        if type( r.maxSub ) == "number" then
            Current.maxSub = r.maxSub
        end
         if type( r.stamp ) == "string" then
         if type( r.stamp ) == "string" then
             if Current.stamp then
             if Current.stamp then
Zeile 439: Zeile 443:
                 end
                 end
                 e.super = s
                 e.super = s
            elseif e then
                e.super = true
             end
             end
         end
         end
Zeile 608: Zeile 614:
     --    amend  -- string, with name of template, or false
     --    amend  -- string, with name of template, or false
     --    around  -- object, with frame, or false
     --    around  -- object, with frame, or false
     -- Returns string with story
     -- Returns string with story, or false
     local higher
     local higher
     local n      = 1
     local n      = 1
Zeile 620: Zeile 626:
             sup          = higher.super
             sup          = higher.super
             reverse[ n ] = higher
             reverse[ n ] = higher
             if sup then
             if higher.loose then
                n = -1
                break    -- repeat
            elseif sup then
                 n = n + 1
                 n = n + 1
                if n > Current.maxSub then
                    reverse[ n ] = { seed = "???????" }
                    break    -- repeat
                end
             else
             else
                 break    -- repeat
                 break    -- repeat
Anonymer Benutzer