summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/helpers.js')
-rw-r--r--lib/handlebars/compiler/helpers.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/handlebars/compiler/helpers.js b/lib/handlebars/compiler/helpers.js
index 5d8fec1..8ba7b40 100644
--- a/lib/handlebars/compiler/helpers.js
+++ b/lib/handlebars/compiler/helpers.js
@@ -140,7 +140,7 @@ function checkWhitespace(isRoot, next1, next2, disallowIndent) {
function omitRight(statements, i) {
var first = statements[i == null ? 0 : i + 1];
if (first) {
- first.omit = true;
+ first.string = '';
}
}
@@ -158,6 +158,7 @@ function omitLeft(statements, i) {
// We omit the last node if it's whitespace only and not preceeded by a non-content node.
if (last && /^[\s]*$/.test(last.string) && (!prev || prev.type === 'content')) {
- return last.omit = true;
+ last.string = '';
+ return true;
}
}