--- a/cubicweb/misc/source_highlight.py Fri Sep 27 06:20:39 2019 +0200
+++ b/cubicweb/misc/source_highlight.py Wed Sep 25 05:42:47 2019 +0200
@@ -22,11 +22,13 @@
return pygments_highlight(code, get_lexer_by_name(language), TerminalFormatter())
-def highlight_html(code, language, linenos=False):
+def highlight_html(code, language, linenos=False, linenostart=1, **kwargs):
if not has_pygments:
return str(code)
- return pygments_highlight(str(code), get_lexer_by_name(language), HtmlFormatter(wrapcode=True, linenos=linenos))
+ return pygments_highlight(str(code),
+ get_lexer_by_name(language),
+ HtmlFormatter(wrapcode=True, linenos=linenos, linenostart=linenostart, **kwargs))
def generate_css():