[feature] dark theme for code highlighter in the result list

Closes: https://github.com/searxng/searxng/issues/1354

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2023-09-06 19:12:27 +02:00 committed by Markus Heiser
parent 432febd810
commit 935aed7ca4
5 changed files with 290 additions and 154 deletions

View file

@ -216,7 +216,7 @@ def code_highlighter(codelines, language=None):
lexer = get_lexer_by_name(language, stripall=True)
except Exception as e: # pylint: disable=broad-except
logger.exception(e, exc_info=True)
logger.warning("pygments lexer: %s " % e)
# if lexer is not found, using default one
lexer = get_lexer_by_name('text', stripall=True)