Push to stack after attribute processing
authorDuncan Beevers <duncan@dweebd.com>
Tue, 2 Sep 2014 04:24:08 +0000 (23:24 -0500)
committerDuncan Beevers <duncan@dweebd.com>
Tue, 2 Sep 2014 04:24:15 +0000 (23:24 -0500)
src/htmlparser.js

index 0535473..26093cd 100644 (file)
 
       unary = empty[ tagName ] || !!unary;
 
-      if ( !unary ) {
-        stack.push( tagName );
-      }
-      else {
-        unarySlash = tag.match( endingSlash );
-      }
-
       var attrs = [];
 
       rest.replace(attr, function () {
         });
       });
 
+      if ( !unary ) {
+        stack.push( tagName );
+      }
+      else {
+        unarySlash = tag.match( endingSlash );
+      }
+
+
       if ( handler.start ) {
         handler.start( tagName, attrs, unary, unarySlash );
       }