Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 4569bf55f2b353cf21175fd65418fc68b86d0f4a 1 parent 2cf6fdd
Sidney San Martín authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  jquery.haml-1.3.js
6  jquery.haml-1.3.js
@@ -192,14 +192,14 @@
192 192
     exec_haml(newnode, haml);
193 193
 
194 194
     // Then attach it's children to the page.
195  
-    this.append(newnode.children());
  195
+    this.append(newnode.contents());
196 196
 
197 197
     // Flush action queue once we're on the page
198 198
     if (this.closest('body').length > 0) {
199 199
       flush_queue();
200 200
     }
201 201
 
202  
-    return newnode.children();
  202
+    return newnode.contents();
203 203
   }
204 204
 
205 205
   // Like the original haml, but returns the new nodes instead of the
@@ -234,7 +234,7 @@
234 234
         // Build the dom on a non-attached node
235 235
         var node = $(document.createElement("div"));
236 236
         node.haml(callback.apply(this, arguments));
237  
-        children = node.children();
  237
+        children = node.contents();
238 238
         return children;
239 239
       }
240 240
 

0 notes on commit 4569bf5

Please sign in to comment.
Something went wrong with that request. Please try again.