Module:Chord edo approximation: Difference between revisions

Pailiaq (talk | contribs)
No edit summary
Pailiaq (talk | contribs)
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 203: Line 203:


     -- === PASS 2: emit padded, em-dash-separated cell content ===
     -- === PASS 2: emit padded, em-dash-separated cell content ===
     local SEP = ' — '
     local SEP = ' '  


     for _, r in ipairs(results) do
     for _, r in ipairs(results) do
Line 214: Line 214:
             table.insert(padded_errs, pad_left(r._err_strs[i], max_err_w[i]))
             table.insert(padded_errs, pad_left(r._err_strs[i], max_err_w[i]))
         end
         end
        local steps_cell = '<code>' .. table.concat(padded_steps, SEP) .. '</code>'
local CODE_STYLE = ' style="padding:2px 3px;white-space:nowrap;"'
        local cents_cell = '<code>' .. table.concat(padded_cents, SEP) .. '</code>'
local steps_cell = '<code' .. CODE_STYLE .. '>' .. table.concat(padded_steps, SEP) .. '</code>'
        local errs_cell  = '<code>' .. table.concat(padded_errs,  SEP) .. '</code>'
local cents_cell = '<code' .. CODE_STYLE .. '>' .. table.concat(padded_cents, SEP) .. '</code>'
 
local errs_cell  = '<code' .. CODE_STYLE .. '>' .. table.concat(padded_errs,  SEP) .. '</code>'
         -- Steps data attribute for the play button (unpadded, comma-separated)
         -- Steps data attribute for the play button (unpadded, comma-separated)
         local steps_data_parts = {"0"}
         local steps_data_parts = {"0"}