Module:List: Difference between revisions
no edit summary
SecurityXP (talk | contribs) m (1 revision imported: Template) Tags: Mobile edit Mobile web edit |
SecurityXP (talk | contribs) No edit summary |
||
Line 23:
data.classes = {}
if listType == 'horizontal' or listType == 'horizontal_ordered' then
table.insert(data.classes, 'hlist hlist-separated')
elseif listType == 'unbulleted' then
table.insert(data.classes, 'plainlist')
Line 92:
item.style = args['item' .. tostring(num) .. '_style']
or args['item_style' .. tostring(num)]
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
table.insert(data.items, item)
end
Line 160 ⟶ 158:
local ret = ''
if isDeprecated then
ret = ret .. '[[Category:
end
return ret
Line 168 ⟶ 166:
if not listType or not listTypes[listType] then
error(string.format(
"bad argument #1 to 'makeList' ('%s'
tostring(listType)
), 2)
Line 182 ⟶ 180:
p[listType] = function (frame)
local mArguments = require('Module:Arguments')
local origArgs = mArguments.getArgs(frame
valueFunc = function (key, value)
if not value or not mw.ustring.find(value, '%S') then return nil end
if mw.ustring.find(value, '^%s*[%*#;:]') then
return value
else
return value:match('^%s*(.-)%s*$')
end
return nil
end
})
-- Copy all the arguments to a new table, for faster indexing.
local args = {}
|