mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
remove space in functions arguments doc
This commit is contained in:
parent
8664cc9718
commit
f6d158bbf2
@ -749,8 +749,8 @@ class BuiltinTest(BuiltinFormatterFunction):
|
|||||||
category = 'If-then-else'
|
category = 'If-then-else'
|
||||||
__doc__ = doc = _(
|
__doc__ = doc = _(
|
||||||
r'''
|
r'''
|
||||||
``test(value, text if not empty, text if empty)`` -- return ``text if not empty`` if
|
``test(value, text_if_not_empty, text_if_empty)`` -- return ``text_if_not_empty`` if
|
||||||
the value is not empty, otherwise return ``text if empty``.
|
the value is not empty, otherwise return ``text_if_empty``.
|
||||||
''')
|
''')
|
||||||
|
|
||||||
def evaluate(self, formatter, kwargs, mi, locals, val, value_if_set, value_not_set):
|
def evaluate(self, formatter, kwargs, mi, locals, val, value_if_set, value_not_set):
|
||||||
@ -766,9 +766,9 @@ class BuiltinContains(BuiltinFormatterFunction):
|
|||||||
category = 'If-then-else'
|
category = 'If-then-else'
|
||||||
__doc__ = doc = _(
|
__doc__ = doc = _(
|
||||||
r'''
|
r'''
|
||||||
``contains(value, pattern, text if match, text if not match)`` -- checks if the value
|
``contains(value, pattern, text_if_match, text_if_not_match)`` -- checks if the value
|
||||||
is matched by the regular expression ``pattern``. Returns ``text if match`` if
|
is matched by the regular expression ``pattern``. Returns ``text_if_match`` if
|
||||||
the pattern matches the value, otherwise returns ``text if no match``.
|
the pattern matches the value, otherwise returns ``text_if_not_match``.
|
||||||
''')
|
''')
|
||||||
|
|
||||||
def evaluate(self, formatter, kwargs, mi, locals,
|
def evaluate(self, formatter, kwargs, mi, locals,
|
||||||
@ -1059,8 +1059,8 @@ class BuiltinIfempty(BuiltinFormatterFunction):
|
|||||||
category = 'If-then-else'
|
category = 'If-then-else'
|
||||||
__doc__ = doc = _(
|
__doc__ = doc = _(
|
||||||
r'''
|
r'''
|
||||||
``ifempty(value, text if empty)`` -- if the value is not empty then return that value,
|
``ifempty(value, text_if_empty)`` -- if the value is not empty then return that value,
|
||||||
otherwise return ``text if empty``.
|
otherwise return ``text_if_empty``.
|
||||||
''')
|
''')
|
||||||
|
|
||||||
def evaluate(self, formatter, kwargs, mi, locals, val, value_if_empty):
|
def evaluate(self, formatter, kwargs, mi, locals, val, value_if_empty):
|
||||||
@ -1076,10 +1076,10 @@ class BuiltinShorten(BuiltinFormatterFunction):
|
|||||||
category = 'String manipulation'
|
category = 'String manipulation'
|
||||||
__doc__ = doc = _(
|
__doc__ = doc = _(
|
||||||
r'''
|
r'''
|
||||||
``shorten(value, left chars, middle text, right chars)`` -- Return a shortened version
|
``shorten(value, left_chars, middle_text, right_chars)`` -- Return a shortened version
|
||||||
of the value, consisting of ``left chars`` characters from the beginning of the
|
of the value, consisting of ``left_chars`` characters from the beginning of the
|
||||||
value, followed by ``middle text``, followed by ``right chars`` characters from
|
value, followed by ``middle_text``, followed by ``right_chars`` characters from
|
||||||
the end of the value. ``Left chars`` and ``right chars`` must be non-negative
|
the end of the value. ``left_chars`` and ``right_chars`` must be non-negative
|
||||||
integers.
|
integers.
|
||||||
|
|
||||||
Example: assume you want to display the title with a length of at most
|
Example: assume you want to display the title with a length of at most
|
||||||
|
Loading…
x
Reference in New Issue
Block a user