Module:Dash: Difference between revisions
Jump to navigation
Jump to search
ArrowHead294 (talk | contribs) Oops |
ArrowHead294 (talk | contribs) No edit summary |
||
| Line 10: | Line 10: | ||
sp = " " | sp = " " | ||
else | else | ||
sp = " | sp = " " | ||
end | end | ||
Revision as of 03:33, 12 May 2024
- This module should not be invoked directly; use its corresponding template instead: Template:Dash.
Replaces comma and space in list with dashes and spaces.
| Introspection summary for Module:Dash | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||
No function descriptions were provided. The Lua code may have further information.
local p = {}
function p.dashes(frame)
local sp = ""
local se = ""
if frame.args["spaces"] == "thin" then
sp = " "
elseif frame.args["spaces"] == "hair" 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