mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
First error in first_matching_compare documentation
This commit is contained in:
parent
dfc0923db1
commit
8f7c23816d
@ -254,7 +254,7 @@ The following functions are available in addition to those described in single-f
|
||||
|
||||
``first_matching_cmp(10,5,"small",10,"middle",15,"large","giant")``
|
||||
|
||||
returns "middle". The same example with a first value of 16 returns "giant".
|
||||
returns "large". The same example with a first value of 16 returns "giant".
|
||||
* ``first_non_empty(value, value, ...)`` -- returns the first value that is not empty. If all values are empty, then the empty value is returned. You can have as many values as you want.
|
||||
* ``format_date(x, date_format)`` -- format_date(val, format_string) -- format the value, which must be a date field, using the format_string, returning a string. The formatting codes are::
|
||||
|
||||
|
@ -187,7 +187,7 @@ class BuiltinFirstMatchingCmp(BuiltinFormatterFunction):
|
||||
'the first comparison that succeeds. Returns else_result '
|
||||
'if no comparison succeeds. Example: '
|
||||
'first_matching_cmp(10,5,"small",10,"middle",15,"large","giant") '
|
||||
'returns "middle". The same example with a first value of 16 returns "giant".')
|
||||
'returns "large". The same example with a first value of 16 returns "giant".')
|
||||
|
||||
def evaluate(self, formatter, kwargs, mi, locals, *args):
|
||||
if (len(args) % 2) != 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user