Module:If preview/sandbox: Difference between revisions

Content deleted Content added
more standard if/else statements
Tag: Reverted
Also use mw.addWarning for cfg.missing_warning
Tag: Reverted
Line 43:
local warning = args[1] and args[1]:match('^%s*(.-)%s*$') or ''
if warning == '' then
mw.addWarning(cfg.missing_warning)
return warning_text(cfg.missing_warning)
elseif cfg.preview then