Fix incorrect indent on interpolated lambdas.

Fixes #286
This commit is contained in:
Justin Hileman
2016-02-14 08:37:41 -08:00
parent 131cad6024
commit f3ae65eb33
3 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -498,7 +498,7 @@ class Mustache_Compiler
}
const VARIABLE = '
$value = $this->resolveValue($context->%s(%s), $context, $indent);%s
$value = $this->resolveValue($context->%s(%s), $context);%s
$buffer .= %s%s;
';
+2 -3
View File
@@ -164,16 +164,15 @@ abstract class Mustache_Template
*
* @param mixed $value
* @param Mustache_Context $context
* @param string $indent
*
* @return string
*/
protected function resolveValue($value, Mustache_Context $context, $indent = '')
protected function resolveValue($value, Mustache_Context $context)
{
if (($this->strictCallables ? is_object($value) : !is_string($value)) && is_callable($value)) {
return $this->mustache
->loadLambda((string) call_user_func($value))
->renderInternal($context, $indent);
->renderInternal($context);
}
return $value;