Permalink
Browse files

Partial Mustache views assume the right parent tag for live-binding

  • Loading branch information...
daffl committed Dec 6, 2012
1 parent 0af5dc5 commit 492a22f7655d1ff15c37b95213252c87a264fe3e
Showing with 3 additions and 3 deletions.
  1. +2 −2 view/ejs/test/ejs_test.js
  2. +1 −1 view/scanner.js
@@ -1209,8 +1209,8 @@ test("inserting live-binding partials assume the correct parent tag", function()
var dom = can.view('tableView', data);
div.appendChild(dom);
equal(can.view.render('tableView', data), "<table><tbody><tr><td data-view-id='7'>@@!!@@</td></tr></tbody></table>",
"Rendered output is correct");
equal(can.view.render('tableView', data).indexOf('<table><tbody><tr><td data-view-id='), 0, "Rendered output starts" +
"as expected");
equal(div.innerHTML, "<table><tbody><tr><th>Test 1</th><th>Test 2</th></tr></tbody></table>",
"Document Fragment live-bound output is correct");
});
View
@@ -369,7 +369,7 @@ Scanner.prototype = {
}
var escaped = startTag === tmap.escapeLeft ? 1 : 0,
commands = { insert: insert_cmd, tagName: tagName, status: status() };
commands = { insert: insert_cmd, tagName: getTag(tagName, tokens, i), status: status() };
for(var ii = 0; ii < this.helpers.length;ii++){
// Match the helper based on helper

0 comments on commit 492a22f

Please sign in to comment.