local p = {}
function p.dashes(frame)
local sp = ""
local se = ""
if frame.args["spaces"] == "thin" then
sp = " "
elseif frame.args["spaces"] == "hair" then
sp = " "
elseif frame.args["spaces"] == "space" then
sp = " "
else
sp = ""
end
if frame.args["separator"] == "mdash" then
se = "—"
elseif frame.args["separator"] == "ndash" then
se = "–"
else
se = "-"
end
local out_str = sp .. se .. sp
return "<span>" .. frame.args["input_str"]:gsub("%s+", out_str) .. "</span>"
end
return p