Philipp Hörist pushed to branch master at gajim / gajim
Commits:
381d3d23 by Philipp Hörist at 2026-07-16T17:15:59+02:00
imprv: CodeSnippets: Map python to python3 for syntax highlighting
- - - - -
1 changed file:
- gajim/gtk/conversation/code_widget.py
Changes:
=====================================
gajim/gtk/conversation/code_widget.py
=====================================
@@ -19,6 +19,8 @@
log = logging.getLogger("gajim.gtk.conversation.code_widget")
+LANG_MAP = {"python": "python3"}
+
class CodeWidget(Gtk.Box, SignalManager):
def __init__(self, account: str) -> None:
@@ -83,7 +85,7 @@ def _prepare_code(text: str) -> tuple[str, str | None]:
lang = code_start[3:]
code = text.partition("\n")[2][:-4]
- return code, lang
+ return code, LANG_MAP.get(lang, lang)
class CodeTextview(GtkSource.View):
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/381d3d2337ed346b5f559bddd4a1817ce803ef04
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/381d3d2337ed346b5f559bddd4a1817ce803ef04
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]