Module:Sports table: Difference between revisions

Content deleted Content added
nevermind, problem is elsewhere
add table anchor and wording for future events per talk page
Line 19:
local team_list = {}
local jj, jjj
local table_anchor = mw.ustring.gsub(Args['section'] and 'sports-table-' .. Args['section'] or '', ' ', '_')
-- Exit early if we are using section transclusion for a different section
Line 36 ⟶ 37:
local baselink = frame:getParent():getTitle()
if mw.title.getCurrentTitle().text == baselink then baselink = '' end
local template_name = (baselink ~= '' and (':' .. baselink .. (Args[table_anchor ~= 'article_section'] and '#' .. Args['article_section']table_anchor or '')))
or ''
 
Line 182 ⟶ 183:
Args['table_header'] = Args['table_header'] .. Args['table_header_source']
title_source = true
end
 
-- Add a table anchor
if table_anchor ~= '' then
table.insert(t, '<span class="anchor" id="' .. table_anchor .. '"></span>\n')
end
 
Line 554 ⟶ 560:
elseif string.lower(update)=='future' then
-- Future start date
if start_date:find('^[A-Z][a-z]+%s+%d+$') or start_date:find('^%d+$') then
table.insert(t_footer,'First '..matches_text..' will be played on '..start_date..'. ')
table.insert(t_footer,'First '..matches_text..' will be played in '..start_date..'. ')
else
table.insert(t_footer,'First '..matches_text..' will be played on '..start_date..'. ')
end
else
table.insert(t_footer,'Updated to '..matches_text..' played on '..update..'. ')