Module:Preview warning

From Good Old TV Fan Wiki

local p = {}

local function trim(s) return s:match('^%s*(.-)%s*$') end

function p.main(frame) local preview = frame.args[1]:match('^%s*(.-)%s*$') or if preview == then preview = 'Something is wrong with this template' end

if frame:preprocess( "4770" ) == "" then return '

Warning: ' .. preview .. ' (this message is shown only in preview).

' end

end

return p