Module:Space

local p = {}

function p.Main(frame) local args = frame:getParent.args local spaceType = args[1] local repetitions = tonumber(args[2]) return p.main(spaceType, repetitions) end

function p.main(spaceType, repetitions) local space = p.spaces[spaceType] or p.spaces["normal"] return string.rep(space, repetitions or 1) end

p.spaces = { ["non-breaking"] = " ", ["normal"] = "&#32;", ["thin"] = "&thinsp;", ["en"] = "&ensp;", ["em"] = "&emsp;", ["tab"] = "&tab;" }

return p