Module:TAMNAMS: Difference between revisions
Updated to shorter prefixes |
If an empty string is entered into the verify prefix/abbrev functions for a mos outside the tamnams named range, it'll default to mos/m |
||
| Line 293: | Line 293: | ||
if mos_prefix == "NONE" or mos_prefix == "none" then | if mos_prefix == "NONE" or mos_prefix == "none" then | ||
mos_prefix = "" | mos_prefix = "" | ||
elseif mos_prefix == "" then | |||
mos_prefix = "mos" | |||
end | end | ||
return mos_prefix | return mos_prefix | ||
| Line 303: | Line 305: | ||
function p.verify_abbrev(input_mos, mos_abbrev) | function p.verify_abbrev(input_mos, mos_abbrev) | ||
local mos_abbrev = p.lookup_abbrev(input_mos) or mos_abbrev or "m" | local mos_abbrev = p.lookup_abbrev(input_mos) or mos_abbrev or "m" | ||
if | if mos_abbrev == "NONE" or mos_abbrev == "none" then | ||
mos_abbrev = "" | mos_abbrev = "" | ||
elseif mos_abbrev == "" then | |||
mos_abbrev = "m" | |||
end | end | ||
return mos_abbrev | return mos_abbrev | ||
| Line 901: | Line 905: | ||
function p.tester() | function p.tester() | ||
return p.verify_prefix(mos.new(5,3), "") | |||
end | end | ||
return p | return p | ||