Modül:Spor tablosu/Custom
-- Style for sports tables with custom columns
local pp = {}
function pp. get_col_styles(Args) -- Load relevant modules local yesno = require('Module:Yesno') local col_style = {} local num_cols = 1 -- Default styles local default_style = Args['default_style'] or if default_style:match('^([Ww][Dd]?[Ll])') then -- Backwards compatibility with WDL if not yesno(Args['hide_played'] or 'no') then col_style[num_cols] = 'pld' num_cols = num_cols +1 end if yesno(Args['show_win'] or 'yes') then col_style[num_cols] = 'w' num_cols = num_cols +1 end local loss_first = yesno(Args['loss_before_draw'] or Args['loss_before_tie'] or false) if loss_first and yesno(Args['show_loss'] or 'yes') then col_style[num_cols] = 'l' num_cols = num_cols +1 end if yesno(Args['show_draw'] or default_style:match('^[Ww]([Dd])[Ll]')~=nil) then col_style[num_cols] = 'd' num_cols = num_cols +1 end if (not loss_first) and yesno(Args['show_loss'] or 'yes') then col_style[num_cols] = 'l' num_cols = num_cols +1 end local fa_letter = string. lower(Args['for_against_style'] or ) if fa_letter ~= then if fa_letter 'games' then fa_letter = 'game' elseif fa_letter == 'none' then fa_letter = nil else fa_letter = fa_letter:match('^(%a).