Module:Sports series: Difference between revisions

Content deleted Content added
improvements: fix pattern matching, auto generate small font size for future matches, remove unnecessary text-align:center, directly generate abbr code
improve logic
Line 221:
str = str:gsub("%b()", "")
 
-- Exit if string contains only en/em dash
if str == "—" or str == "–" then
return false
Line 562 ⟶ 563:
-- Create aggregate score cell with conditional styling
local aggregateStyle = ''
if legs == 0 and not disableSmallText and aggregateScore ~= '' and checkSmallText(aggregateScore) then
aggregateStyle = 'font-size: ' .. smallFontSize .. '%;'
end
Line 601 ⟶ 602:
end
local legStyle = ''
if not disableSmallText and legScore ~= '' and checkSmallText(legScore) then
legStyle = 'font-size: ' .. smallFontSize .. '%;'
end