# HG changeset patch # User Laurent Peuch # Date 1569558039 -7200 # Node ID a61e0fe17a6952fcc1ef0f80729b01f8ab5aed36 # Parent 7d2c61d40fe9ab107fc10111c46b785e8304e17a [debug/fix] ensure that not syntax highlighted code is a string Otherwise it could be in another unrendered form that makes marko complains. Closes #17256791 diff -r 7d2c61d40fe9 -r a61e0fe17a69 cubicweb/misc/source_highlight.py --- a/cubicweb/misc/source_highlight.py Thu Sep 12 05:59:10 2019 +0200 +++ b/cubicweb/misc/source_highlight.py Fri Sep 27 06:20:39 2019 +0200 @@ -24,7 +24,7 @@ def highlight_html(code, language, linenos=False): if not has_pygments: - return code + return str(code) return pygments_highlight(str(code), get_lexer_by_name(language), HtmlFormatter(wrapcode=True, linenos=linenos))