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

ナビゲーションに移動 検索に移動
コード修正。モジュール:List/sandboxの2021年12月13日 (月) 00:33(JST)の版から。
(「モジュール:List」の保護レベルを変更しました: Wikipedia:保護の方針#半永久的な保護影響が特に大きいテンプレート」に基づき無期限拡張半保護 ([編集=拡張承認された利用者と管理者に許可] (無期限) [移動=拡張承認された利用者と管理者に許可] (無期限)))
(コード修正。モジュール:List/sandboxの2021年12月13日 (月) 00:33(JST)の版から。)
69行目: 69行目:
-- Start number for ordered lists
-- Start number for ordered lists
data.start = args.start
data.start = args.start
if listType == 'horizontal_ordered' then
if listType == 'ordered' or listType == 'horizontal_ordered' then
-- Apply fix to get start numbers working with horizontal ordered lists.
-- Apply fix to get start numbers working with horizontal ordered lists.
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
94行目: 95行目:
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
124行目: 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
}
}
158行目: 163行目:
local ret = ''
local ret = ''
if isDeprecated then
if isDeprecated then
ret = ret .. ''
ret = ret .. '[[Category:List templates with deprecated parameters]]'
end
end
return ret
return ret
匿名利用者

案内メニュー