Module:Sports table: Difference between revisions

Content deleted Content added
jjj might not exist, create as general local in beginning
Do pre-check for result definition
Line 144:
-- For results column
local new_res_ii = ii_start
-- Pre-check for existence of column
for ii = ii_start, ii_end do
if text_result ~= Args['result'..ii] then results_defined = true end
end
-- Write rows
Line 362 ⟶ 366:
local text_result = Args['text_'..result_local] or ''
text_field_result = '| style="'..ii_fw..bg_col..'" rowspan="'..tostring(N_rows_res)..'" |'..text_result..note_res_string..'\n'
-- Insert the field if needed
if text_result ~= '' then results_defined = true end
-- See whether it is needed (only when blank for all entries)
if results_defined orthen table.insert(jjj<ii_endt,text_field_result) thenend
table.insert(t,text_field_result)
end
end
end
Line 375:
if full_table then
table.insert(t,'|- style="background-color:'..result_col['black1']..'; line-height:3pt;"\n')
if results_defined or (jjj<ii_end) then
-- With results column
table.insert(t,'||||||||||||||||||||||\n')