local mHatnote = require('Module:Hatnote')local mArguments -- lazily initialise
local p =
function p.forfun(frame) mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame,) local pages = local firstArg = (args[1] and args[1]) or 'other uses' for k, v in pairs(args) do if type(k)
function p._for(titleText, firstArg, ...) local links = mHatnote.formatPages(...) --Module:See also behavior --links = mw.text.listToText(links) --Oxford comma if table.getn(links) <= 2 then links = mw.text.listToText(links, ' and ') else links = mw.text.listToText(links, ', ', ', and ') end if links
local noAdd = local noFullStop = false for k, v in pairs(noAdd) do noFullStop = noFullStop or string.find(text, v) if noFullStop then break end end
if not noFullStop then text = text .. '.' end return mHatnote._hatnote(text)end
return p