Ticket #17179: 17179.diff

File 17179.diff, 978 bytes (added by Calvin Spealman, 6 years ago)

yesno docs now explain the argument is optional, and the default

  • docs/ref/templates/builtins.txt

    diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
    index 4e5c124..6b02571 100644
    a b If ``value`` is ``Joel is a slug``, the output would be:: 
    2288 Given a string mapping values for true, false and (optionally) None,
     2288Maps values for true, false and (optionally) None, to the strings "yes", "no",
     2289"maybe", or a custom mapping passed as a comma-separated list, and
    22892290returns one of those strings according to the value:
    22912292For example::
    For example:: 
    22952296==========  ======================  ==================================
    22962297Value       Argument                Outputs
    22972298==========  ======================  ==================================
     2299``True``                            ``yes``
    22982300``True``    ``"yeah,no,maybe"``     ``yeah``
    22992301``False``   ``"yeah,no,maybe"``     ``no``
    23002302``None``    ``"yeah,no,maybe"``     ``maybe``
Back to Top