Module:Param Parse: Difference between revisions
yes_no
No edit summary |
(yes_no) |
||
Line 48:
end
return parse▼
-- Yes/No
local yes_no = {
['Yes'] = true,
['No'] = false,
['N/A'] = 'NIL',
}
function parse.yes_no(text)
if yes_no[text] then
return text
end
end
function parse.yes_no_smw(text)
if text == 'N/A' then
return nil
end
return yes_no[text] or nil
end
-- </nowiki>
|