View source for Module:Hatnote list
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
--------------------------------------------------------------------------------
-- For see
--
-- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the
-- {{about}} and {{redirect}} templates and their variants. Also incidentally
-- introduces andList & orList helpers, useful for other hatnote lists.
--------------------------------------------------------------------------------
local mArguments --initialize lazily
local mHatnote = require('Module:Hatnote')
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local p = {}
function p.andList (list)
-- Stringifies a list with "and"
return mw.text.listToText(list, nil, (#list > 2 and ',' or '') .. ' and ')
end
function p.orList (list)
000
1:0
Template used on this page:
Return to Module:Hatnote list.