Cleaning up a few things like ...
authorMicky Hulse <mickyhulse@gmail.com>
Wed, 21 Aug 2013 22:14:17 +0000 (15:14 -0700)
committerMicky Hulse <mickyhulse@gmail.com>
Wed, 21 Aug 2013 22:14:17 +0000 (15:14 -0700)
… removal of an unused variable.

dist/all.js
src/htmlparser.js

index 21c7de5..beeb700 100644 (file)
@@ -56,7 +56,7 @@
   var reCache = { }, stackedTag, reStackedTag, tagMatch;
 
   var HTMLParser = global.HTMLParser = function( html, handler ) {
-    var index, chars, ignored = [], match, stack = [], last = html, prevTag, nextTag;
+    var index, chars, match, stack = [], last = html, prevTag, nextTag;
     stack.last = function(){
       return this[ this.length - 1 ];
     };
@@ -67,7 +67,7 @@
       // Make sure we're not in a script or style element
       if ( !stack.last() || !special[ stack.last() ] ) {
 
-        // Comment
+        // Comment:
         if ( html.indexOf("<!--") === 0 ) {
           index = html.indexOf("-->");
 
           }
         }
 
+        // Doctype:
         else if ( (match = doctype.exec( html )) ) {
           if ( handler.doctype )
             handler.doctype( match[0] );
           html = html.substring( match[0].length );
           chars = false;
+        }
 
-        // end tag
-        else if ( html.indexOf("</") === 0 ) {
+        // End tag:
+        else if ( html.indexOf("</") === 0 ) {
           match = html.match( endTag );
 
           if ( match ) {
             chars = false;
           }
 
-        // start tag
+        // Start tag:
         } else if ( html.indexOf("<") === 0 ) {
           match = html.match( startTag );
 
index c6b81dd..c82564c 100644 (file)
@@ -56,7 +56,7 @@
   var reCache = { }, stackedTag, reStackedTag, tagMatch;
 
   var HTMLParser = global.HTMLParser = function( html, handler ) {
-    var index, chars, ignored = [], match, stack = [], last = html, prevTag, nextTag;
+    var index, chars, match, stack = [], last = html, prevTag, nextTag;
     stack.last = function(){
       return this[ this.length - 1 ];
     };
@@ -67,7 +67,7 @@
       // Make sure we're not in a script or style element
       if ( !stack.last() || !special[ stack.last() ] ) {
 
-        // Comment
+        // Comment:
         if ( html.indexOf("<!--") === 0 ) {
           index = html.indexOf("-->");
 
           }
         }
 
+        // Doctype:
         else if ( (match = doctype.exec( html )) ) {
           if ( handler.doctype )
             handler.doctype( match[0] );
           html = html.substring( match[0].length );
           chars = false;
+        }
 
-        // end tag
-        else if ( html.indexOf("</") === 0 ) {
+        // End tag:
+        else if ( html.indexOf("</") === 0 ) {
           match = html.match( endTag );
 
           if ( match ) {
             chars = false;
           }
 
-        // start tag
+        // Start tag:
         } else if ( html.indexOf("<") === 0 ) {
           match = html.match( startTag );