[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
--- 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))