Module:Hatnote list: Difference between revisions
Content deleted Content added
Removed default texts set in forSeeArgsToTable(); unset items in table are now empty rather than filled with defaults; defaults are filled in forSeeTableToString(). |
Updated with "formatted" option for andList and orList from sandbox |
||
Line 26:
separator = ",",
altSeparator = ";",
space = " ",
formatted = false
}
Line 40 ⟶ 41:
end
local s = options.space
-- Format the list if requested
if options.formatted then list = mHatnote.formatPages(unpack(list)) end
-- Set the separator; if any item contains it, use the alternate separator
local separator = options.separator
Line 58 ⟶ 61:
-- Stringifies a list with "and"
function p.andList (list, formatted)
return stringifyList(list, {conjunction = "and", formatted = formatted})
end
-- Stringifies a list with "or"
function p.orList (list, formatted)
return stringifyList(list, {conjunction = "or", formatted = formatted})
end
|