mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
string changes
This commit is contained in:
parent
f5a414b3a6
commit
bec1e4395f
@ -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')
|
||||
|
||||
|
@ -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 '
|
||||
|
Loading…
x
Reference in New Issue
Block a user