Skip to content

Commit

Permalink
Partial Mustache views assume the right parent tag for live-binding
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Dec 6, 2012
1 parent 0af5dc5 commit 492a22f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions view/ejs/test/ejs_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
Expand Down
2 changes: 1 addition & 1 deletion view/scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 492a22f

Please sign in to comment.