Module:Ifeq

-- This function is for testing if two strings are equal inside a parser function local p = {}

function p.ifeq ( frame ) -- killMarkers removes the UNIQ code that is added to arguments -- See https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##ifeq local arg1 = mw.text.trim( mw.text.killMarkers ( tostring(frame.args[1]) ) ) local arg2 = mw.text.trim( mw.text.killMarkers ( tostring(frame.args[2]) ) ) local arg3 = frame.args[3];

if arg1 == arg2 then return "equal" else return arg3 .. "/" .. arg2 .. "+Prev:" .. mw.text.nowiki( arg1 ) .. ",Next:" .. mw.text.nowiki( arg2 ) .. "."   end

return "?" end return p