Content deleted Content added
streamline matching |
remove html comments from some args; no line if double skip |
||
Line 69:
function p._main(args, frame)
function args:clean(key)--prevent html comments from breaking some args
p.cols = tonumber(args.columns)▼
args[key] = args[key] and string.gsub(string.gsub(mw.text.decode(args[key]), '<!.+>', ''), '%W', '') or nil
p.bold = ({low = 1, high = 2})[args.bold_winner]▼
return args[key]
end
local skipMatch, unBold = {}, {}--(skip|manualbold)match# to boolean
for k,
local mType, mNum = string.match(k, '^(%a+)match(%d+)$')
mType, mNum = ({skip = skipMatch, manualbold = unBold})[mType], tonumber(mNum)
if mType and mNum then
mType[mNum] =
end
end
Line 88 ⟶ 92:
}) do
if args[v] ~= nil then
p[v] = args
end
end
Line 175 ⟶ 179:
:tag'td'
:attr{rowspan = bump + 4}
:css('border-bottom', not skipMatch[RD.top] and '1px solid' or nil)
RD.n = 0
for r = bumps + 1, rows, p.unit * 2 do
Line 200 ⟶ 204:
:attr{rowspan = maxSpan(p.unit * 4, r + p.unit, rows)}
:css{
['border-width'] = (RD.t % 2 < 1 and 2 or 0) .. '
['border-style'] = 'solid'
}
|