Code

Ticket #17179: 17179.diff

File 17179.diff, 978 bytes (added by calvinspealman, 2 years ago)

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

Line 
1diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
2index 4e5c124..6b02571 100644
3--- a/docs/ref/templates/builtins.txt
4+++ b/docs/ref/templates/builtins.txt
5@@ -2285,7 +2285,8 @@ If ``value`` is ``Joel is a slug``, the output would be::
6 yesno
7 ^^^^^
8 
9-Given a string mapping values for true, false and (optionally) None,
10+Maps values for true, false and (optionally) None, to the strings "yes", "no",
11+"maybe", or a custom mapping passed as a comma-separated list, and
12 returns one of those strings according to the value:
13 
14 For example::
15@@ -2295,6 +2296,7 @@ For example::
16 ==========  ======================  ==================================
17 Value       Argument                Outputs
18 ==========  ======================  ==================================
19+``True``                            ``yes``
20 ``True``    ``"yeah,no,maybe"``     ``yeah``
21 ``False``   ``"yeah,no,maybe"``     ``no``
22 ``None``    ``"yeah,no,maybe"``     ``maybe``