Module:Listify
From A Wiki of Ice and Fire
Documentation for this module may be created at Module:Listify/doc
local getArgs = require('Module:Arguments').getArgs
local p = {}
function p.listify(frame)
local args = getArgs(frame)
local str = args[1] or ""
str:gsub("<(br|BR)%s*/*>", "\n")
local l = mw.html.create('ul')
for s in str:gmatch("([^" .. "\n" .. "]+") do
l:tag('li'):wikitext(s)
end
return tostring(l)
end
return p