diff --git a/src/syntax_highlighting/consts.py b/src/syntax_highlighting/consts.py index a315a7a..5649bd5 100644 --- a/src/syntax_highlighting/consts.py +++ b/src/syntax_highlighting/consts.py @@ -13,7 +13,7 @@ import os from anki import version -anki21 = version.startswith("2.1.") +anki21 = not hasattr(str, 'decode') sys_encoding = sys.getfilesystemencoding() if anki21: