From def0045819bac681f10895a76f3f9c8462a15613 Mon Sep 17 00:00:00 2001 From: gugutu <59798823+gugutu@users.noreply.github.com> Date: Tue, 5 Mar 2024 03:47:12 +0800 Subject: [PATCH] Fix the issue of incorrect JS file names introduced under Anki 23.12.1 --- src/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/__init__.py b/src/__init__.py index a3ed3e5..bebae28 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -26,7 +26,7 @@ class EditorPreview(object): buildversion = buildinfo.version.split(".") # Anki changed their versioning scheme in 2023 to year.month(.patch), causing things to explode here. - if int(buildversion[0]) >= 24: + if int(buildversion[0]) >= 24 or (int(buildversion[0]) == 23 and int(buildversion[1]) == 12 and 2 < len(buildversion) and int(buildversion[2])) >= 1: # >= 23.12.1 self.js = [ "js/mathjax.js", "js/vendor/mathjax/tex-chtml-full.js",