From a8103c650e23ddd3852d1cef5955671889f30467 Mon Sep 17 00:00:00 2001 From: 413Michele <413Michele@users.noreply.github.com> Date: Sun, 27 Jul 2025 13:27:18 +0200 Subject: [PATCH] Change [/]. to .[/] --- src/calibre/utils/formatter_functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/utils/formatter_functions.py b/src/calibre/utils/formatter_functions.py index 008fd4187a..25914aba4b 100644 --- a/src/calibre/utils/formatter_functions.py +++ b/src/calibre/utils/formatter_functions.py @@ -754,7 +754,7 @@ class BuiltinSubstr(BuiltinFormatterFunction): def __doc__getter__(self): return translate_ffml( r''' ``substr(value, start, end)`` -- returns the ``start``'th through the ``end``'th -characters of ``value``[/]. The first character in ``value`` is the zero'th character. +characters of ``value``.[/] The first character in ``value`` is the zero'th character. If ``end`` is negative then it indicates that many characters counting from the right. If ``end`` is zero, then it indicates the last character. For example, ``substr('12345', 1, 0)`` returns ``'2345'``, and ``substr('12345', 1, -1)`` @@ -772,7 +772,7 @@ class BuiltinLookup(BuiltinFormatterFunction): def __doc__getter__(self): return translate_ffml( r''' ``lookup(value, [ pattern, key, ]* else_key)`` -- The patterns will be checked against -the ``value`` in order[/]. If a ``pattern`` matches then the value of the field named by +the ``value`` in order.[/] If a ``pattern`` matches then the value of the field named by ``key`` is returned. If no pattern matches then the value of the field named by ``else_key`` is returned. See also the :ref:`switch` function. ''') @@ -818,7 +818,7 @@ class BuiltinContains(BuiltinFormatterFunction): def __doc__getter__(self): return translate_ffml( r''' ``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_not_match``. ''')