Module:MOS modes: Difference between revisions

Ganaram inukshuk (talk | contribs)
Added support for multiple columns
Ganaram inukshuk (talk | contribs)
mNo edit summary
Line 47: Line 47:
end
end


-- Helper function that parses mode names from a semicolon-delimited string and returns the names in an array
-- Helper function that parses entries from a semicolon-delimited string and returns them in an array
function p.parse_entries(mode_names_unparsed)
function p.parse_entries(unparsed)
local mode_names = {}
local parsed = {}
for name in string.gmatch(mode_names_unparsed, '([^;]+)') do
for entry in string.gmatch(unparsed, '([^;]+)') do
table.insert(mode_names, name) -- Add to array
table.insert(parsed, entry) -- Add to array
end
end
return mode_names
return parsed
end
end