Module:Multinbsp

local p = {} local getArgs = require('Module:Arguments').getArgs local strlower = string.lower -- Convert to lower case

function p.Multinbsp(frame) -- Implements local args = getArgs(frame, {		trim = false,		removeBlanks = false		}) local prebrk = false

if args["prebreak"] then prebrk = true end return p._Multinbsp(args, prebrk) end

function p._Multinbsp( args, brkbefore ) local nonbreakingspaces = ' ' local count = args['count'] -- use count param for count if args['count'] == nil then -- use param 1, if no count= count = args[1] elseif args[1] == nil then -- blank type if no param 1 count = '1' end

if brkbefore then nonbreakingspaces = ' ' .. nonbreakingspaces end

if count > 1 then local i = count - 1 while i > 0 do nonbreakingspaces = nonbreakingspaces .. ' '			 i = i - 1 end end

-- Return non-breaking spaces wikitext return nonbreakingspaces end

return p