midrare / anki-code-highlight Goto Github PK
View Code? Open in Web Editor NEWSyntax highlighting for code blocks in Anki
License: MIT License
Syntax highlighting for code blocks in Anki
License: MIT License
I tried this addon in Anki 2.1.35 and got the following error message:
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2024-02-21 12:35:52
Caught exception:
Traceback (most recent call last):
File "aqt\browser.py", line 1519, in onTogglePreview
File "aqt\previewer.py", line 60, in open
File "aqt\previewer.py", line 121, in _setup_web_view
File "aqt\webview.py", line 378, in stdHtml
File "aqt\gui_hooks.py", line 3024, in __call__
File "C:\Users\Swact\AppData\Roaming\Anki2\addons21\1415523481\main.py", line 159, in _on_webview_will_set_content
_append_color_scheme_css(web_content)
File "C:\Users\Swact\AppData\Roaming\Anki2\addons21\1415523481\main.py", line 45, in _append_color_scheme_css
config = DEFAULT_CONFIG | (aqt.mw.addonManager.getConfig(__name__) or {})
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'
So you need to fix the description of the addon on AnkiWeb: write 2.1.49+ (?)
(I don't know exactly when Anki starts to use Python 3.9) instead of 2.1.1+
.
I primarily use Anki on mobile, but I can't get the syntax to change for some reason. Specifically, I'm targeting the base16/ros-pine
theme. On desktop it works, but I had to go through every card for the highlighting to change (something with Anki's cache?), but on mobile I just don't get anything. Before I spend a ton of time debugging it myself, can you confirm this supports mobile (iOS in my case)? Many thanks!
I tried to install it by the traditional Anki way (Tools > addons > Get Addons > paste the addon's id from the ankiweb). It seems to work exactly the same way as if it was installed using the download-archive-file method (i.e. the method from your Prerequisites).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.