FANDOM


local export = {}
 
function export.build(frame)
    jap, rom = {}, {}
    for i in (frame.args[1].."\n"):gmatch("([^\n]*)\n") do 
        table.insert(jap, i) 
    end
    for i in (frame.args[2].."\n"):gmatch("([^\n]*)\n") do 
        table.insert(rom, i) 
    end
    if #jap > #rom then
        for i=1, #jap-#rom do
            table.insert(rom, "")
        end
    elseif #jap < #rom then
        for i=1, #rom-#jap do
            table.insert(jap, "")
        end
    end
    table = "{| style=\"width:100%\"\n! align=left |''Japanese'' (日本語歌詞)\n! align=left |''Romaji'' (ローマ字)\n";
    for i=1, #jap do
        if jap[i] == "" and rom[i] == "" then
            table=table.."|-\n|<br>\n"
        elseif jap[i] == rom[i] then
            table=table.."|-\n|{{shared}}|"..jap[i].."\n"
        else
            table=table.."|-\n|"..jap[i].."\n|"..rom[i].."\n"
        end
    end
    table=table.."|}"
    return table
end
 
return export

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.