Module:MOS mode degrees: Difference between revisions

Ganaram inukshuk (talk | contribs)
m removed redundant line of code
Ganaram inukshuk (talk | contribs)
No edit summary
Line 131: Line 131:
local result = "{| class=\"wikitable sortable mw-collapsible center-2 center-3" .. (is_collapsed and " mw-collapsed\"\n" or "\"\n")
local result = "{| class=\"wikitable sortable mw-collapsible center-2 center-3" .. (is_collapsed and " mw-collapsed\"\n" or "\"\n")
-- Table header
-- Header cell for the table's title
-- If it's for a modmos, add the step pattern
-- If it's for a modmos, add the step pattern
result = result .. string.format("|+ style=\"font-size: 105%%;\" | Scale degree qualities of %s modes", scale_sig) .. (is_true_mos and "\n" or string.format(" (%s)\n", step_pattern))
local title = string.format("Scale degree qualities of %s", scale_sig) .. (is_true_mos and " " or string.format(" (%s)%nbsp;", step_pattern))
local num_cols = 3 + (mode_names_given and 1 or 0) + #step_patterns[1] -- 3 for udp, rotational order, and step pattern; plus possibly 1 for mode names, then 1 for each scale degree in a mode
result = result .. string.format("! colspan=\"%s\" | %s", num_cols, title)
.. "|-\n"
-- Add table headers for first row
-- Add table headers for first row