-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inkdrop 5.6.0 breaks plugin #11
Comments
Dug into this more. The failing line is here. The issue appears to be that |
The error (loading of codemirror addons) can be fixed with this patch. diff --git a/lib/code-fold.js b/lib/code-fold.js
index ed1613e..409eb0b 100644
--- a/lib/code-fold.js
+++ b/lib/code-fold.js
@@ -1,5 +1,6 @@
+const path = require('node:path');
const app = require('@electron/remote').app;
-const modulePath = app.getAppPath() + '/node_modules/'
+const modulePath = path.dirname(app.getAppPath()) + '/node_modules/'
require(modulePath + 'codemirror/addon/fold/foldcode.js');
require(modulePath + 'codemirror/addon/fold/foldgutter.js');
require(modulePath + 'codemirror/addon/fold/markdown-fold.js'); With this patch I am again able to expand and collapse sections with the corresponding keybindings. It seems like this plugin is not maintained for a while now, so I didn't create a PR as it possibly wouldn't be merged. But if anyone wants to use this, you can just apply the patch locally. /cc @marksweiss Edit: |
The code fold plugin in the inkdrop plugin registry will be updated from now on through a fork of this repo. This issue has been fixed there. |
After the upgrade, this error message upon launch or re-install of plugin:
The text was updated successfully, but these errors were encountered: