Changes

Jump to: navigation, search

Module:Yesno

31 bytes added, 02:43, 27 April 2015
recognise "t" for true and "f" for false, per request
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
or val == 'y'
or val == 'true'
or val == 't'
or tonumber(val) == 1
then
or val == 'n'
or val == 'false'
or val == 'f'
or tonumber(val) == 0
then
Anonymous user

Navigation menu