Damien Elmes
237c0791f8
more hook tweaks, and merge the pre-render field and template hooks
2020-01-15 17:18:11 +10:00
Damien Elmes
cab572b63c
remove _hook/_filter suffix
2020-01-15 16:53:24 +10:00
Damien Elmes
b2f756f1b7
tweak the hook names in anki/
...
still a work in progress
2020-01-15 16:43:22 +10:00
Damien Elmes
26cb9851b4
idempotent hook removal
...
This matches remHook()'s behaviour
2020-01-15 13:16:43 +10:00
Damien Elmes
f021d616dd
add optional docstring to hooks
2020-01-15 12:14:32 +10:00
Damien Elmes
c67aefa3ea
move hook gen code out of anki/
...
It's not needed at runtime, and this allows hooks to be updated
even when the code is broken.
2020-01-15 09:11:20 +10:00
Damien Elmes
33bf4c204b
add hook to modify template prior to rendering
2020-01-13 21:57:15 +10:00
Damien Elmes
d266dcd076
add a flag to handle the legacy hook missing args case
...
And update a few more hooks.
2020-01-13 18:37:08 +10:00
Damien Elmes
b86ae31907
update the rest of the anki/ hooks/filters
2020-01-13 17:59:52 +10:00
Damien Elmes
4bb3d7a958
add separate file for gui hooks
2020-01-13 14:38:05 +10:00
Damien Elmes
dd61389319
New type-safe approach to hooks/filters
...
Still todo:
- Add separate module for GUI hooks
- Update the remaining runHook/runFilter() calls
- Document the changes, including defensive registration
2020-01-13 13:57:51 +10:00