--- 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
--- 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 = [
--- 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
--- 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 = '<br {0} />'.format('class="{0}"'.format(css_class) if css_class else '')
- return context.replace(character, br)
+ return value.replace(character, br)