Module:Template error: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
Content deleted Content added
mNo edit summary
stylesheets already have a class for that
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
local text = args[1]
local text = args[1]
mw.addWarning(text)
mw.addWarning(text)
return '<span style=\'color=red\' class=\'templateerror\'>' .. text .. '</span>'
return '<span class=\'error\'>' .. text .. '</span>'
end
end
return p
return p

Latest revision as of 21:10, 15 June 2024

Documentation for this module may be created at Module:Template error/doc

local p = {}
function p.templateErr( f )
	local args = mw.getCurrentFrame():getParent().args
	local text = args[1]
	mw.addWarning(text)
	return '<span class=\'error\'>' .. text .. '</span>'
end
return p