「モジュール:List」の版間の差分

ja>ネイ
start引数が機能していないため修正
 
ja>Pppery
Per edit request
77行目: 77行目:
local startNum = tonumber(data.start)
local startNum = tonumber(data.start)
if startNum then
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum)
data.counterReset = 'listitem ' .. tostring(startNum - 1)
data.counterIncrement = 'listitem -1'
end
end
end
end
99行目: 98行目:
item.value = args['item' .. tostring(num) .. '_value']
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
or args['item_value' .. tostring(num)]
if item.value ~= nil then
item.style = 'counter-reset: listitem ' .. item.value .. ';counter-increment: none;' .. ((item.style) or '')
end
table.insert(data.items, item)
table.insert(data.items, item)
end
end
132行目: 128行目:
:css{
:css{
['counter-reset'] = data.counterReset,
['counter-reset'] = data.counterReset,
['counter-increment'] = data.counterIncrement,
['list-style-type'] = data.listStyleType
['list-style-type'] = data.listStyleType
}
}
190行目: 185行目:
local mArguments = require('Module:Arguments')
local mArguments = require('Module:Arguments')
local origArgs = mArguments.getArgs(frame, {
local origArgs = mArguments.getArgs(frame, {
frameOnly = ((frame and frame.args and frame.args.frameonly or '') ~= ''),
valueFunc = function (key, value)
valueFunc = function (key, value)
if not value or not mw.ustring.find(value, '%S') then return nil end
if not value or not mw.ustring.find(value, '%S') then return nil end