Module:Sandbox/ChaoticShadow/SongDataLine: Difference between revisions

From TestWiki
Content added Content deleted
No edit summary
(Blanked the page)
Tag: Blanking
Line 1: Line 1:
local getArgs = require('Module:Arguments').getArgs

local p = {}
local args = {}

local root = mw.html.create('ul')
local what = ''

function split(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={}
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
table.insert(t, str)
end
return t
end


function p.main(frame)
args = getArgs(frame)

for k,v in pairs(args) do
what = what .. v
local lines = split(v, "\n")
root:tag('li'):wikitext(table.concat(lines, "<br>"))
end
return '<pre>' .. mw.dumpObject(args) .. '</pre>'
.. '<br>' ..
'<pre>' .. what .. '</pre>'
.. '<br>' ..
tostring(root)
end

return p

Revision as of 04:14, 9 August 2021

Documentation for this module may be created at Module:Sandbox/ChaoticShadow/SongDataLine/doc