Module:Progression rainbow/sandbox: Difference between revisions

Content deleted Content added
add all the newlines
poke
Line 107:
local root = mw.html.create('table')
root:addClass('progression-rainbow'):attr('role', 'presentation'):tag('tr')
-- We add a tr here. MediaWiki (Remex we think) adds a second. One of
:attr('role', 'presentation')
-- addedthem deliberately, we get abecomes <tr class='empty'></tr> hanging
:newline()
root:tag('tr')
 
for _, class in ipairs(classes) do
Line 116 ⟶ 115:
local percentage = class_percent(class.count, total)
root:newline() -- sprinkled through to make the HTML easier to read
-- I don't understand why we don't need to create a 'tr'. When
-- added deliberately, we get a <tr class='empty'></tr> hanging
-- out. Possibly a consequence of Remex instead of HTML Tidy
-- or maybe mw.html is just smarter than me.
root:tag('td')
:css('background', frame:expandTemplate{