Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
If a hook is used in more than one active script, it is executed only in one of them #663
It seems if more than one script uses the same hook it is executed for only one of them. I came across it while developing the integration for markdown-it. Both https://github.com/qownnotes/scripts/tree/master/markdown-it and https://github.com/qownnotes/scripts/tree/master/preview-styling use
Additionally it may be a good idea to introduce a dependency/priority mechanism between scripts to be able to specify the call order.
The hook is executed in only one of the enabled scripts.
Steps to reproduce
Although there is a custom stylesheet setting in markdown-it, this is not the cause - I saw the behaviour without it (and in fact that is the reason I added it as a workaround for now)
Wow, thank you! I tested it with preview-styling and markdown-it (I added manually a script.log() in both scripts' hooks) and both get called. However the calling order isn't changed when I rearrange them in the script settings. I tried restarting the application and it's still the same.
I haven't done a clean install, just upgraded the app.