syntax-highlighting
syntax-highlighting copied to clipboard
syntax-highlighting ng (new fork)
Checklist
Please replace the space inside the brackets with an x if the following items apply:
- [x] I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
- [x] I've verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
- [x] I've checked if anyone else suggested this feature before by looking through the issue reports.
Problem case
So far it looks there are quite few issues in the backburner, due to a combination of lack of manpower (likely), old code support (eg. mixed py2/py3) etc.
Solution
I decided to fork it and try to address them into a new fork called syntax-highlighting-ng.
The main goals here are:
- support fully python 3.x (no backward compatibility)
- use only anki21 (no backward compatibility)
- start to refactor the code base so it is locally testable without using the main application (pytest)
- support for mypy/ruff/black out of the box on commit (pre-commit)
Too bad you didn't actually "fork" the repo, but re-uploaded the code. Otherwise we would have a nice way of comparing your changes with the original code and assess if your changes are safe to use.
I wouldn't re-uploaded the code if the changes were smaller, the new version introduces:
- a newer pygments under libs using a whl file (easier to manage/update)
- drops support for older anki20 (that means less code to maintain)
- typing!
- support for pre-commit (eg. it helps to keep the code clean)
- adds tests!
- support github workflows on the commit
As well cleaning up the code and cover it with a set of tests (that should make easier to maintain)
You can check out latest version of both and see the differences side by side, the code retain the original structure, to make the comparison easier (that was a deliberate choice).