From bec1e4395f7ec5503aa11d318836f7495f40651a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 24 Jul 2022 03:53:03 +0530 Subject: [PATCH] string changes --- manual/template_lang.rst | 2 +- src/calibre/utils/formatter_functions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/template_lang.rst b/manual/template_lang.rst index d8367cbdbb..36fc4e8f9f 100644 --- a/manual/template_lang.rst +++ b/manual/template_lang.rst @@ -646,7 +646,7 @@ Stored general program mode templates * ``foo(a, b)`` call the template passing the values of the two variables ``a`` and ``b``. * ``foo(if field('series') then field('series_index') else 0 fi)`` -- if the book has a ``series`` then pass the ``series_index``, otherwise pass the value ``0``. -You retrieve the arguments passed in the call to the stored template using the ``arguments`` function. It both declares and initializes local variables, effectively parameters. The variables are positional; they get the value of the value given in the call in the same position. If the corresponding parameter is not provided in the call then ``arguments`` assigns that variable the provided default value. If there is no default value then the variable is set to the empty string. For example, the following ``arguments`` function declares 2 variables, ``key``, ``alternate``:: +You retrieve the arguments passed in the call to the stored template using the ``arguments`` function. It both declares and initializes local variables, effectively parameters. The variables are positional; they get the value of the parameter given in the call in the same position. If the corresponding parameter is not provided in the call then ``arguments`` assigns that variable the provided default value. If there is no default value then the variable is set to the empty string. For example, the following ``arguments`` function declares 2 variables, ``key``, ``alternate``:: arguments(key, alternate='series') diff --git a/src/calibre/utils/formatter_functions.py b/src/calibre/utils/formatter_functions.py index 2a8c80ddaf..7a4706b50c 100644 --- a/src/calibre/utils/formatter_functions.py +++ b/src/calibre/utils/formatter_functions.py @@ -2135,7 +2135,7 @@ class BuiltinArguments(BuiltinFormatterFunction): '-- Used in a stored template to retrieve the arguments ' 'passed in the call. It both declares and initializes ' 'local variables, effectively parameters. The variables ' - 'are positional; they get the value of the value given ' + 'are positional; they get the value of the parameter given ' 'in the call in the same position. If the corresponding ' 'parameter is not provided in the call then arguments ' 'assigns that variable the provided default value. If '