From d4b4e631fb1ef52c0231cd445efb76057df18fb3 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Mon, 15 Apr 2024 09:14:26 +0200 Subject: [PATCH] Note a TODO --- theme/templatetags/issues.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/theme/templatetags/issues.py b/theme/templatetags/issues.py index 5812845..4441cae 100644 --- a/theme/templatetags/issues.py +++ b/theme/templatetags/issues.py @@ -29,6 +29,8 @@ def _core_pygments(code, filename=None): # off, if (when) we want to turn this back on we could either [1] implement something more performant (preferred # option), perhaps by giving a greater role to the filename or [2] cache the result of the guessing (or even of the # whole of pygemtize() (but "caching is hard"). + # then, once we actually implement guessing, the PythonLexer should probably not be the fallback (instead: guessing + # without filename) # lexer = guess_lexer_for_filename(filename, code) if filename else PythonLexer() lexer = PythonLexer()