Module:labels: Difference between revisions

Added slash functionality
mNo edit summary
(Added slash functionality)
Line 31: Line 31:
local label = l_data.labels[l_id]
local label = l_data.labels[l_id]
if i > 1 then
if i > 1 then
local conjunctions = {["with"] = true, ["and"] = true, ["or"] = true}
local conjunctions = {["with"] = true, ["and"] = true, ["or"] = true, ["/"] = true}
if conjunctions[l_id] or conjunctions[labels[i-1]] then
if conjunctions[l_id] or conjunctions[labels[i-1]] then
skip_comma = true
skip_comma = true
end
end
out = out .. (skip_comma and " " or ", ")
out = out .. (skip_comma or ",")
if not (l_id == "/" or labels[i-1] == "/") then
out = out .. " "
end
end
end
if label == null then
if label == null then