Module:TAMNAMS: Difference between revisions
Decided against having a name verifier as none of them have a name field, only prefix and abbrev |
m prefix/abbrev-verify functions only omit a prefix if the text is "NONE" or "none" |
||
| Line 291: | Line 291: | ||
function p.verify_prefix(input_mos, mos_prefix) | function p.verify_prefix(input_mos, mos_prefix) | ||
local mos_prefix = p.lookup_prefix(input_mos) or mos_prefix or "mos" | local mos_prefix = p.lookup_prefix(input_mos) or mos_prefix or "mos" | ||
if mos_prefix == "NONE" or mos_prefix == "" then | if mos_prefix == "NONE" or mos_prefix == "none" then | ||
mos_prefix = "" | mos_prefix = "" | ||
end | end | ||
| Line 303: | Line 303: | ||
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_prefix == "NONE" or mos_prefix == "none" then | ||
mos_abbrev = "" | mos_abbrev = "" | ||
end | end | ||