Module:CharList: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 35: Line 35:
         end
         end
     end
     end
    local placeholder = '%#!%|'


     -- Shift the new table's indexes up after getting rid of the base name.
     -- Shift the new table's indexes up after getting rid of the base name.
Line 43: Line 45:
             for k2, v2 in ipairs(named_list[k][i]) do
             for k2, v2 in ipairs(named_list[k][i]) do
                 local name = named_list[k][i][k2]:gsub('</div>', ''):gsub("<div id='nav'>", '')
                 local name = named_list[k][i][k2]:gsub('</div>', ''):gsub("<div id='nav'>", '')
                 named_list[k][i][k2] = trim(name:gsub('%#!%|', ''));
                 named_list[k][i][k2] = trim(name:gsub(placeholder, ''));


                 -- Create a table of characters with placeholders, marked as not released.
                 -- Create a table of characters with placeholders, marked as not released.
                 if string.match(name, '%#!%|') then
                 if string.match(name, placeholder) then
                     table.insert(not_exist, name)
                     table.insert(not_exist, name:gsub(placeholder))
                 end
                 end
             end
             end