Module:ParseList: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 62: Line 62:
htmlList = function (elements)
htmlList = function (elements)
local result = ""
local result = ""
for str in elements do
for i, str in ipairs(elements) do
result = result .. "* " .. str
result = result .. "* " .. str
end
end
Line 69: Line 69:
local result = ""
local result = ""
local first = true
local first = true
for str in elements do
for i, str in ipairs(elements) do
if first then
if first then
result = str
result = str
Line 97: Line 97:
local listString = args[1]
local listString = args[1]
local strings = splitListString(listString)
local strings = splitListString(listString)
for str in strings do
for i, str in ipairs(strings) do
table.insert(elements, processElement(str))
table.insert(elements, processElement(str))
end
end