Module:number list: Difference between revisions

No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 130: Line 130:
retval.tag = {content}
retval.tag = {content}
end
end
elseif prefix == "q" or prefix == "qq" or prefix == "tr" or prefix == "link" or prefix == "id" then
elseif prefix == "q" or prefix == "qq" or prefix == "tr" or prefix == "link" or prefix == "id" or prefix == "alt" then
if retval[prefix] then
if retval[prefix] then
error(("Duplicate modifier '%s' in data module form, already saw value '%s': %s"):format(prefix,
error(("Duplicate modifier '%s' in data module form, already saw value '%s': %s"):format(prefix,
Line 995: Line 995:
local appendix2 = canonical_name .. " numbers"
local appendix2 = canonical_name .. " numbers"
local appendix
local appendix
local title
local title = appendix2
if mw.title.new(appendix1, "Appendix"):getContent() then
appendix = appendix1
elseif mw.title.new(appendix2, "Appendix"):getContent() then
appendix = appendix2
end
 
if appendix then
title = "[[Appendix:" .. appendix .. "|" .. appendix2 .. "]]"
else
title = appendix2
end


local function format_cell(contents, class_name, colspan, bold)
local function format_cell(contents, class_name, colspan, bold)