Modul:TestTabs
Aus FürthWiki
Die Dokumentation für dieses Modul kann unter Modul:TestTabs/Doku erstellt werden
local p = {}
function p.unstrip(frame)
return mw.text.unstrip(frame.args[1] or '')
end
p.helloWorld = function()
local details = mw.html.create( 'details' )
details
:attr( 'id', 'testdiv' )
:css( 'width', '100%' )
:wikitext( 'Some text' )
:tag( 'hr' )
return tostring( div )
-- Output: <div id="testdiv" style="width:100%;">Some text<hr /></div>
end
p.justFun = function(a)
args = a.args
return 'The name was ' .. tostring(args)
end
p.checkMac = function(a)
args = a.args
return 'Your check is Mc' .. args.name
end
p.preprocess = function(a)
args = a.args
f = mw.getCurrentFrame()
--return mw.text.unstrip(a.text)
return f:preprocess( args.text )
end
return p