Module:Infobox chord: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 38: | Line 38: | ||
local color_name = frame.args["ColorName"] | local color_name = frame.args["ColorName"] | ||
if utils.value_provided(color_name) then | if utils.value_provided(color_name) then | ||
local | local caption2 = "[[Color notation|Color name]]" | ||
-- search for ", " not "," because many chord names contain commas, e.g. Cz,y6 | -- search for ", " not "," because many chord names contain commas, e.g. Cz,y6 | ||
if name:match(", ") then | if name:match(", ") then | ||
caption2 = "[[Color notation|Color names]]" | |||
-- removing manual line breaks | -- removing manual line breaks | ||
local matches | local matches | ||
| Line 48: | Line 48: | ||
cats = cats .. "[[Category:Todo:remove manual line breaks]]" | cats = cats .. "[[Category:Todo:remove manual line breaks]]" | ||
end | end | ||
-- replacing | -- replacing every comma+whitespace(s) instance with a line break | ||
name = name:gsub(",%s+", "<br />") | name = name:gsub(",%s+", "<br />") | ||
end | end | ||
table.insert(infobox_data, { | table.insert(infobox_data, { | ||
caption2, | |||
color_name, | color_name, | ||
}) | }) | ||