From 8664cc971823d196c78261342867a3f59f27c27e Mon Sep 17 00:00:00 2001 From: un-pogaz <46523284+un-pogaz@users.noreply.github.com> Date: Sun, 17 Nov 2024 13:27:55 +0100 Subject: [PATCH] add `&` operator and `$` prefix doc --- src/calibre/utils/formatter_functions.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/calibre/utils/formatter_functions.py b/src/calibre/utils/formatter_functions.py index f07173de04..c4676628a5 100644 --- a/src/calibre/utils/formatter_functions.py +++ b/src/calibre/utils/formatter_functions.py @@ -352,7 +352,8 @@ class BuiltinStrcat(BuiltinFormatterFunction): __doc__ = doc = _( r''' ``strcat(a [, b]*)`` -- can take any number of arguments. Returns a string -formed by concatenating all the arguments. +formed by concatenating all the arguments. In most cases you can use the ``&`` operator +instead of this function. ''') def evaluate(self, formatter, kwargs, mi, locals, *args): @@ -3159,8 +3160,8 @@ r''' the lookup name ``lookup_name``. The field must be multi-valued such as ``authors`` or ``tags``, otherwise the function raises an error. This function is much faster than ``list_count()`` because it operates directly on calibre -data without converting it to a string first. Example: -``list_count_field('tags')`` +data without converting it to a string first. Example: ``list_count_field('tags')``. +The ``$`` prefix can be used instead of the function, as in ``$tags``. ''') def evaluate(self, formatter, kwargs, mi, locals, *args):