Module:Sandbox/User:Microbrews/Variants: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 39: Line 39:
for _, entry in ipairs(smw_data) do
for _, entry in ipairs(smw_data) do
local name = entry['page']
local name = entry['page']
local variant_name = name:gsub(' ' .. main_variant .. '$', '', 1)
local variant_name = name:gsub(main_variant .. '$', '', 1)
table.insert(formatted, '[[' .. name .. '|' .. variant_name .. ']]')
table.insert(formatted, '[[' .. name .. '|' .. variant_name .. ']]')
end
end