# HG changeset patch # User Thierry Florac # Date 1532091162 -7200 # Node ID 04c7803a8e64fe26f20ddab16ac3414ba7b9dab2 # Parent bd5572d676e0c12e78fb41ff04b816704b25564c Version 0.1.17.1 diff -r bd5572d676e0 -r 04c7803a8e64 buildout.cfg --- a/buildout.cfg Fri Jul 20 12:44:08 2018 +0200 +++ b/buildout.cfg Fri Jul 20 14:52:42 2018 +0200 @@ -96,4 +96,4 @@ eggs = pyams_utils [test] [versions] -pyams_utils = 0.1.17 +pyams_utils = 0.1.17.1 diff -r bd5572d676e0 -r 04c7803a8e64 setup.py --- a/setup.py Fri Jul 20 12:44:08 2018 +0200 +++ b/setup.py Fri Jul 20 14:52:42 2018 +0200 @@ -25,7 +25,7 @@ README = os.path.join(DOCS, 'README.txt') HISTORY = os.path.join(DOCS, 'HISTORY.txt') -version = '0.1.17' +version = '0.1.17.1' long_description = open(README).read() + '\n\n' + open(HISTORY).read() tests_require = [ diff -r bd5572d676e0 -r 04c7803a8e64 src/pyams_utils.egg-info/PKG-INFO --- a/src/pyams_utils.egg-info/PKG-INFO Fri Jul 20 12:44:08 2018 +0200 +++ b/src/pyams_utils.egg-info/PKG-INFO Fri Jul 20 14:52:42 2018 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyams-utils -Version: 0.1.17 +Version: 0.1.17.1 Summary: Utility functions and classes for PyAMS Home-page: http://www.ztfy.org Author: Thierry Florac diff -r bd5572d676e0 -r 04c7803a8e64 src/pyams_utils/text.py --- a/src/pyams_utils/text.py Fri Jul 20 12:44:08 2018 +0200 +++ b/src/pyams_utils/text.py Fri Jul 20 14:52:42 2018 +0200 @@ -162,8 +162,7 @@ breaks with given CSS class. """ - def render(self, context=None, css_class='', character='|'): - if context is None: - context = self.context + @staticmethod + def render(value, css_class='', character='|'): br = '
'.format('class="{0}"'.format(css_class) if css_class else '') - return context.replace(character, br) + return value.replace(character, br)