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

ja>Pppery
Per edit request
1版 をインポートしました
77行目: 77行目:
local startNum = tonumber(data.start)
local startNum = tonumber(data.start)
if startNum then
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum - 1)
data.counterReset = 'listitem ' .. tostring(startNum)
data.counterIncrement = 'listitem -1'
end
end
end
end
98行目: 99行目:
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
128行目: 132行目:
:css{
:css{
['counter-reset'] = data.counterReset,
['counter-reset'] = data.counterReset,
['counter-increment'] = data.counterIncrement,
['list-style-type'] = data.listStyleType
['list-style-type'] = data.listStyleType
}
}
185行目: 190行目:
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