Skip to content

Commit

Permalink
tabs to spaces, folks, this isn't the dark ages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lehnardt committed Oct 30, 2009
1 parent 02ebf69 commit 9b27b22
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mustache.js
Expand Up @@ -29,10 +29,10 @@ var Mustache = function() {
Tries to find a partial in the global scope and render it Tries to find a partial in the global scope and render it
*/ */
render_partial: function(name, context, partials) { render_partial: function(name, context, partials) {
if(typeof(context[name]) != "object") { if(typeof(context[name]) != "object") {
throw("Context for '" + name + "' is not an object."); throw("Context for '" + name + "' is not an object.");
} }
if(!partials || !partials[name]) { if(!partials || !partials[name]) {
throw("No template for partial '" + name + "'."); throw("No template for partial '" + name + "'.");
} }
return this.render(partials[name], context[name], partials); return this.render(partials[name], context[name], partials);
Expand Down Expand Up @@ -89,7 +89,8 @@ var Mustache = function() {
case "=": // set new delimiters, rebuild the replace regexp case "=": // set new delimiters, rebuild the replace regexp
that.set_delimiters(name); that.set_delimiters(name);
regex = new_regex(); regex = new_regex();
// redo the line in order to get tags with the new delimiters on the same line // redo the line in order to get tags with the new
// delimiters on the same line
i--; i--;
return ""; return "";
case "<": // render partial case "<": // render partial
Expand Down

0 comments on commit 9b27b22

Please sign in to comment.