This commit is contained in:
Kovid Goyal 2025-05-25 17:05:44 +05:30
commit c271126633
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2664,12 +2664,13 @@ class BuiltinSwapAroundArticles(BuiltinFormatterFunction):
arg_count = 2 arg_count = 2
category = STRING_MANIPULATION category = STRING_MANIPULATION
__doc__ = doc = _( __doc__ = doc = _(
r''' r''' ``swap_around_articles(value, separator)`` -- returns the ``value`` with
``swap_around_articles(value, separator)`` -- returns the ``value`` with articles moved to articles moved to the end, separated by a semicolon.[/] The ``value`` can be a
the end.[/] The ``value`` can be a list, in which case each item in the list is list, in which case each item in the list is processed. If the ``value`` is a
processed. If the ``value`` is a list then you must provide the ``separator``. If no list then you must provide the ``separator``. If no ``separator`` is provided
``separator`` is provided then the ``value`` is treated as being a single value, not or the separator is the empty string then the ``value`` is treated as being a
a list. The `articles` are those used by calibre to generate the ``title_sort``. single value, not a list. The `articles` are those used by calibre to generate
the ``title_sort``.
''') ''')
def evaluate(self, formatter, kwargs, mi, locals, val, separator): def evaluate(self, formatter, kwargs, mi, locals, val, separator):