From 272fd0fc1f31fe38fa83b5c018a3fe6ea7321cda Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Wed, 3 Mar 2010 21:08:57 -0800 Subject: [PATCH] fix test case --- mustache.js | 5 ++++- test/mustache_spec.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mustache.js b/mustache.js index 796992a..95a68d2 100644 --- a/mustache.js +++ b/mustache.js @@ -154,7 +154,10 @@ var Mustache = function() { this.send(lines[i]); } } - return lines.join("\n"); + + if(in_recursion) { + return lines.join("\n"); + } }, set_delimiters: function(delimiters) { diff --git a/test/mustache_spec.rb b/test/mustache_spec.rb index c01beb1..b12cac9 100644 --- a/test/mustache_spec.rb +++ b/test/mustache_spec.rb @@ -126,7 +126,7 @@ describe "mustache" do chunks.push(chunk); } } - Mustache.to_html(template, partial_context, partials, null, sendFun); + Mustache.to_html(template, partial_context, partials, sendFun); print(chunks.join("\\n")); } catch(e) { print('ERROR: ' + e.message);