Module:Space

local p = {}

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

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

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

return p