Module:LyricsLine

local utils = require('Module:Utilities')

local p = {}

local function formatArg(arg) if arg and arg ~= '' then return table.concat(utils.split(arg, "\n"), " ") else return " " end end

function p.main(frame) local args = frame:getParent.args local root = mw.html.create('tr'):addClass('lyric') local categories = '' root:tag('td'):addClass('ly-jp'):wikitext(formatArg(args['japanese'])) root:tag('td'):addClass('ly-rm'):wikitext(formatArg(args['romaji'])) root:tag('td'):addClass('ly-en'):wikitext(formatArg(args['english'])) if mw.title.getCurrentTitle.namespace == 0 then if args['japanese'] == nil or args['japanese'] == '' then categories = categories .. ""		end if args['romaji'] == nil or args['romaji'] == '' then categories = categories .. ""		end if args['english'] == nil or args['english'] == '' then categories = categories .. ""		end end return tostring(root) .. categories end

return p