Module:Jply

function build(jp,rm) jap, rom = {}, {} for w in (jp .. "\n"):gmatch("([^\n]*)\n") do        table.insert(jap, w)     end for w in (rm .. "\n"):gmatch("([^\n]*)\n") do        table.insert(rom, w)     end if #jap > #rom then for i=0, #jap-#rom-1 do           table.insert(rom, "") end elseif #jap < #rom then for i=0, #rom-#jap-1 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| \n" elseif jap[i] == rom[i] then table=table.."|-\n| | "..jap[i].."\n" else table=table.."|-\n|"..jap[i].."\n|"..rom[i].."\n" end end table=table.."|}" return table end