Module:Scale tree: Difference between revisions
ArrowHead294 (talk | contribs) mNo edit summary |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 13: | Line 13: | ||
local parsed = {} | local parsed = {} | ||
-- for entry in string.gmatch(unparsed, "([^;]+)") do | -- for entry in string.gmatch(unparsed, "([^;]+)") do | ||
for entry in string.gmatch(unparsed, "([^ | 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 | ||
| Line 195: | Line 195: | ||
local depth = frame.args["depth"] or 5 | local depth = frame.args["depth"] or 5 | ||
local comments_unparsed = frame.args["Comments"] or "" | local comments_unparsed = frame.args["Comments"] or "" | ||
local comments = p.parse_kv_pairs(comments_unparsed) or {} | local comments = p.parse_kv_pairs(comments_unparsed:gsub("({{[^{}]+}})", frame:preprocess("%1"))) or {} | ||
local out_str = p._scale_tree(mos, depth, comments) | local out_str = p._scale_tree(mos, depth, comments) | ||