Module:Pretty-pre

--

-- Automatically adds a space before each line. Like the tag, but allows -- markup (e.g. bold or italics).

local p = {}

function p._main(s) local lines = {}

for line in mw.text.gsplit(s, '\n') do       lines[#lines+1] = ' ' .. line end

return table.concat(lines, '\n') end

function p.main(frame) local s = frame:getParent.args[1] or frame.args[1] or ''

return p._main(s) end

return p

-- -- (Add categories here.)