Permalink
Browse files

Text nodes at the top level of a jquery-haml run were being dropped b…

…y `jQuery.fn.children()`. Replaced with `jQuery.fn.contents()`.
  • Loading branch information...
1 parent 2cf6fdd commit 4569bf55f2b353cf21175fd65418fc68b86d0f4a Sidney San Martín committed Jun 10, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 jquery.haml-1.3.js
View
@@ -192,14 +192,14 @@
exec_haml(newnode, haml);
// Then attach it's children to the page.
- this.append(newnode.children());
+ this.append(newnode.contents());
// Flush action queue once we're on the page
if (this.closest('body').length > 0) {
flush_queue();
}
- return newnode.children();
+ return newnode.contents();
}
// Like the original haml, but returns the new nodes instead of the
@@ -234,7 +234,7 @@
// Build the dom on a non-attached node
var node = $(document.createElement("div"));
node.haml(callback.apply(this, arguments));
- children = node.children();
+ children = node.contents();
return children;
}

0 comments on commit 4569bf5

Please sign in to comment.