Module:Preview warning

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( "" ) == "" then return ' Warning: ' .. preview .. ' (this message is shown only in preview). ' end end

return p