Fix the issue of incorrect JS file names introduced under Anki 23.12.1

This commit is contained in:
gugutu 2024-03-05 03:47:12 +08:00 committed by GitHub
parent 6acf2d5bb5
commit def0045819
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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",