Module:Sharpness documentation: Difference between revisions
formatting, nits |
ArrowHead294 (talk | contribs) mNo edit summary |
||
| Line 7: | Line 7: | ||
local notation = frame.args["notation"] or "" | local notation = frame.args["notation"] or "" | ||
-- | -- typ: "sharp" or "flat" | ||
-- value: absolute value of sharpness (the "n" as in sharp-n and flat-n) | -- value: absolute value of sharpness (the "n" as in sharp-n and flat-n) | ||
-- extension: used for identifying alternative symbol set | -- extension: used for identifying alternative symbol set | ||
local | local typ, value, extension = in_str:match("%-(%a*)(%d+)(%a*)") | ||
-- signed sharpness | -- signed sharpness | ||
local s = tonumber(value) | local s = tonumber(value) | ||
if | if typ == "flat" then | ||
s = -s | s = -s | ||
end | end | ||