From 0aa91dc2c3ffdcd8d49b02b11ad8c67e2ad88417 Mon Sep 17 00:00:00 2001 From: Sahab Yazdani Date: Mon, 17 May 2010 06:50:51 -0700 Subject: [PATCH] Documentation for Mustache says that {{> name}} is a reference to the partial 'name'. Mustache JS does not accept this rule. --- mustache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mustache.js b/mustache.js index 4d48090..9401f83 100644 --- a/mustache.js +++ b/mustache.js @@ -164,7 +164,7 @@ var Mustache = function() { regex = new_regex(); return ""; case ">": // render partial - return that.render_partial(name, context, partials); + return that.render_partial(name.replace(/^\s+/,""), context, partials); case "{": // the triple mustache is unescaped return that.find(name, context); default: // escape the value