Skip to content

Commit

Permalink
Bugfix for wrong functions output in partials with indentation
Browse files Browse the repository at this point in the history
This small change fixes the output of functions used in partials with
indentation. Bug reports has shown that the functions output is shifted
with the amount of indentation the partial has.

The bug itself is best illustrated in the tests added in 621ae80.

Closes janl#712
  • Loading branch information
phillipj committed Aug 26, 2019
1 parent c4e56ef commit b3dd964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mustache.js
Expand Up @@ -632,7 +632,7 @@
if (tagIndex == 0 && indentation) {
indentedValue = this.indentPartial(value, indentation);
}
return this.renderTokens(this.parse(indentedValue, tags), context, partials, value);
return this.renderTokens(this.parse(indentedValue, tags), context, partials, indentedValue);
}
};

Expand Down

0 comments on commit b3dd964

Please sign in to comment.