Commit 3e3b70e3 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

[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
parent 7d2c61d40fe9
......@@ -24,7 +24,7 @@ def highlight_terminal(code, language):
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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment