feat: add pygments syntax higlighting

This commit is contained in:
0xMRTT 2023-05-11 01:01:21 +02:00
parent d084a09e5f
commit 90eafb07de
Signed by: 0xMRTT
GPG Key ID: 19C1449A774028BD
2 changed files with 3 additions and 2 deletions

View File

@ -7,4 +7,5 @@ hgchat
openai
googlebardpy
markdown
pymdown-extensions
pymdown-extensions
Pygments

View File

@ -431,7 +431,7 @@ Providers: {self.enabled_providers}
self.response = response
if not self.use_text_view:
response = markdown.markdown(response, extensions=["markdown.extensions.extra", 'pymdownx.arithmatex'])
response = markdown.markdown(response, extensions=["markdown.extensions.extra", 'pymdownx.arithmatex', 'pymdownx.highlight'])
TEMPLATE = """
<html>