Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Lambda functions & template inheritance interact strangely in Hogan 3.0.0 #80

MattCheely opened this Issue · 2 comments

2 participants


Lambda functions within replacement blocks in a child template aren't passed the contents of the lamda function's block. Instead they are passed a string of the correct length, but from some other part of the original template. It appears that the start/end indexes for the substring to pass to the lambda are being determined with the {{< foo}} tags in the string, but the substring is being pulled from a string with the {{< foo}} tags removed.

Some sample code to replicate the issue can be found at:


Actually, I was way off in my guess at the cause - it was just an artifact of the code I happened to be looking at at the time, or possible of me just not paying enough attention to what I was doing.

Anyway, it seems the root cause is that the lambda function call & lookup of the section of the template to pass to it are happening in the context of the parent template, so the correct value that the lambda isn't even anywhere in the string being parsed (except possibly by coincedence)


thanks for the patch.

@sayrer sayrer closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.