Anonimo

Modulo:Sandbox/Lucamauri/modulotest: differenze tra le versioni

Da Wikitrek.
nessun oggetto della modifica
(Prima funzione da https://www.mediawiki.org/wiki/Lua/Tutorial)
 
Nessun oggetto della modifica
 
(13 versioni intermedie di uno stesso utente non sono mostrate)
Riga 1: Riga 1:
--[[
local p = {}
local p = {}
function p.hello(frame)
function p.hello(frame)
     return 'Hello'
     return 'Hello'
end
end
return p
local p = {}
local first = {}
function p.toglitag(testo)
    first = string.gsub(testo.args[1], string.char(127) .. "<" .. testo.args[2] .. ">", "")
    return (string.gsub(first, "</" .. testo.args[2] .. ">", ""))
    return mw.text.killMarkers("<pre>Prova</pre>")   
return mw.text.killMarkers(testo.args[1])
end
return p
]]--
local p = {}
function p.main(frame)
local text = frame.args[1]
return p._main(text)
end
function p._main(text)
if not text then return end
text = mw.text.killMarkers(text)
return text
end
return p
return p