# HG changeset patch # User Thierry Florac # Date 1531819901 -7200 # Node ID 758f286d76aff76e39b00a4ae02041f67e408321 # Parent 9bf1c695938e3b4bdaeb63147c24a0caaf3d4139 Allow arguments to TALES extensions to be multi-lines diff -r 9bf1c695938e -r 758f286d76af src/pyams_utils/tales.py --- a/src/pyams_utils/tales.py Fri Jul 13 17:11:35 2018 +0200 +++ b/src/pyams_utils/tales.py Tue Jul 17 11:31:41 2018 +0200 @@ -40,7 +40,7 @@ return assignment + transform -FUNCTION_EXPRESSION = re.compile('(.+)\((.+)\)') +FUNCTION_EXPRESSION = re.compile('(.+)\((.+)\)', re.MULTILINE | re.DOTALL) ARGUMENTS_EXPRESSION = re.compile('[^(,)]+') @@ -63,7 +63,7 @@ if '=' in arg: key, value = arg.split('=', 1) value = get_value(econtext, value) - return {key: value} + return {key.strip(): value} try: arg = int(arg) # check integer value except ValueError: