Module:Scale tree: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
Line 12: Line 12:
function p.parse_entries(unparsed)
function p.parse_entries(unparsed)
local parsed = {}
local parsed = {}
-- for entry in string.gmatch(unparsed, "([^%$]+)") do
-- for entry in string.gmatch(unparsed, "([^;]+)") do
for entry in string.gmatch(unparsed, "([^|]+)") do
for entry in string.gmatch(unparsed, "([^%$]+)") do
local trimmed = entry:gsub("^%s*(.-)%s*$", "%1")
local trimmed = entry:gsub("^%s*(.-)%s*$", "%1")
table.insert(parsed, trimmed) -- Add to array
table.insert(parsed, trimmed) -- Add to array