Closed kde99 closed 2 years ago
Ok so found the problem: if you have Reload(true) then whenever you reload the templates this library tries to register the helpers using raymond.RegisterHelpers (handlebars.go line 112) that function tries to register the helpers using it's own RegisterHelper(name, helper) function. And this function checks if the given helper has been registered or not. (Doing a git blame on raymond and it appears that code has been there for like 7 years so probably no one needed this so far?) The fix is trivial though. Either
Edit: apparently 1 and 2 are not possible because raymond doesn't export a HasHelper/RemoveHelper or anything similar, also the map containing the helpers is not accessible.
Remove helper has been added by the latest 2018 commit I guess that repo died since then I will be going with a different template engine and closing this.
I just encountered this problem, and it hasn't been fixed Probably going to fork and fix it myself
Hello everyone.
I am trying to add a helper function via AddFunc to the handlebars template engine, but it crashes whenever I use this helper (when loading the page from the browser). I am using GO1.17.2 and the lastest packages (just downloaded them to test).
This is a minimal example case where it still crashes:
The template simply contains
{{getLevelFromXP 1200}}
but it is not parsed because even when the index template is missing I still get the crash.Any help is appreciated.