summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-03-16 11:06:25 +0100
committerGitHub <noreply@github.com>2021-03-16 11:06:25 +0100
commitcb3b379161e3351d4829b2e37478125582b9fc08 (patch)
treeaf37e7b3b0ddfb9a1ec83ada8630d4c404241a16 /searx/webapp.py
parent4c631ac6d0bbe3338598329ee562b92f6766d63a (diff)
parent32cd0d31b3bb7e1c41ce11fd4e4ee9de557ae9a7 (diff)
Merge pull request #2206 from dalf/upgrade-pygments
[mod] upgrade pygments
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index ed1e9ce49..062077292 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -242,7 +242,8 @@ def code_highlighter(codelines, language=None):
# highlight last codepart
formatter = HtmlFormatter(linenos='inline',
- linenostart=line_code_start)
+ linenostart=line_code_start,
+ cssclass="code-highlight")
html_code = html_code + highlight(tmp_code, lexer, formatter)
# reset conditions for next codepart
@@ -256,7 +257,7 @@ def code_highlighter(codelines, language=None):
last_line = line
# highlight last codepart
- formatter = HtmlFormatter(linenos='inline', linenostart=line_code_start)
+ formatter = HtmlFormatter(linenos='inline', linenostart=line_code_start, cssclass="code-highlight")
html_code = html_code + highlight(tmp_code, lexer, formatter)
return html_code