Module:Sharpness documentation: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
Line 8: Line 8:
local note = frame.args["note"] or ""
local note = frame.args["note"] or ""
local out_str = "This template is used for "
local out_str = "This template is used for "
if (d == "flat") then
s = -s
end
if s == 0 then
if s == 0 then
Line 14: Line 18:
else
else
out_str = out_str
out_str = out_str
.. "where a sharp " .. ((d == "flat") and {"lowers"} or {"raises"})[1] .. " by " .. s .. " step"
.. "where a sharp " .. ((s > 0) and {"lowers"} or {"raises"})[1] .. " by " .. s .. " step"
if s ~= 1 then
if s ~= 1 then