Difference between revisions of "Module:Test"

From PKC
Jump to navigation Jump to search
Line 8: Line 8:
function p.greek_letter()
function p.greek_letter()
cf = mw.getCurrentFrame()
cf = mw.getCurrentFrame()
return mw.allToString(cf.args[1])
return "<math>\\" .. mw.allToString(cf.args[1]) .. "</math>"
end
end


return p
return p

Revision as of 09:19, 9 August 2021

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

p = {}

function p.hello_world(a)
	cf = mw.getCurrentFrame()
	return "Hello, world! from " .. mw.allToString(cf.args[3]) .. "-" .. mw.allToString(cf.args[1]) .."-" ..mw.allToString(cf.args[2])
end

function p.greek_letter()
	cf = mw.getCurrentFrame()
	return "<math>\\" .. mw.allToString(cf.args[1]) .. "</math>"
end

return p