Module:Navbox and Module:Navbox/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
fix striping |
fix striping |
||
Line 1: | Line 1: | ||
require('strict') |
require('strict') |
||
local p = {} |
local p = {} |
||
local cfg = mw.loadData('Module:Navbox/configuration') |
local cfg = mw.loadData('Module:Navbox/configuration/sandbox') |
||
local inArray = require("Module:TableTools").inArray |
local inArray = require("Module:TableTools").inArray |
||
local getArgs -- lazily initialized |
local getArgs -- lazily initialized |
||
Line 232: | Line 232: | ||
local list_and_num = format(cfg.arg.list_and_num, listnum) |
local list_and_num = format(cfg.arg.list_and_num, listnum) |
||
local listText = args[list_and_num] |
local listText = args[list_and_num] |
||
if inArray(cfg.keyword.subgroups, listText) then |
if inArray(cfg.keyword.subgroups, listText) then |
||
local childArgs = { |
local childArgs = { |
||
[cfg.arg.border] = cfg.keyword.border_subgroup, |
[cfg.arg.border] = cfg.keyword.border_subgroup, |
||
[cfg.arg.navbar] = cfg.keyword.navbar_plain |
[cfg.arg.navbar] = cfg.keyword.navbar_plain, |
||
} |
} |
||
local hasChildArgs = false |
local hasChildArgs = false |
||
Line 251: | Line 251: | ||
listText = hasChildArgs and p._navbox(childArgs) or listText |
listText = hasChildArgs and p._navbox(childArgs) or listText |
||
end |
end |
||
local oddEven = cfg.marker.oddeven |
local oddEven = cfg.marker.oddeven |
||
if listText:sub(1, 12) == '</div><table' then |
if listText:sub(1, 12) == '</div><table' then |