[O] Parse the url formatting in the message before rendering

This commit is contained in:
Hykilpikonna
2020-11-23 23:23:47 -05:00
parent 17bf45db1c
commit 6a40441549
+2
View File
@@ -1,4 +1,5 @@
import json
from urllib.parse import unquote
import requests
from pygments import highlight as syntax_highlight
@@ -83,6 +84,7 @@ def dictToString(obj, indent=4, indentLevel=1) -> str:
def render(message):
message = unquote(message)
lexer = get_lexer_by_name("diff", stripall=True)
# lexer = guess_lexer(message)
formatter = img.JpgImageFormatter(style="colorful")