Allow several renderers names (separated by ";") in "text_to_html" function and "html" TALES extension
--- a/src/pyams_utils/text.py Mon Dec 17 14:32:29 2018 +0100
+++ b/src/pyams_utils/text.py Thu Dec 20 08:38:06 2018 +0100
@@ -147,9 +147,11 @@
"""
request = check_request()
registry = request.registry
- renderer = registry.queryMultiAdapter((text, request), IHTMLRenderer, name=renderer)
- if renderer is not None:
- return renderer.render()
+ for renderer_name in renderer.split(';'):
+ renderer = registry.queryMultiAdapter((text, request), IHTMLRenderer, name=renderer_name)
+ if renderer is not None:
+ text = renderer.render() or text
+ return text
empty_marker = object()