From: Duncan Beevers Date: Tue, 2 Sep 2014 04:24:08 +0000 (-0500) Subject: Push to stack after attribute processing X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=31eb6d9298e16e7cc6c01057fe5f8a2aab955d1d;p=html-minifier.git Push to stack after attribute processing --- diff --git a/src/htmlparser.js b/src/htmlparser.js index 0535473..26093cd 100644 --- a/src/htmlparser.js +++ b/src/htmlparser.js @@ -305,13 +305,6 @@ unary = empty[ tagName ] || !!unary; - if ( !unary ) { - stack.push( tagName ); - } - else { - unarySlash = tag.match( endingSlash ); - } - var attrs = []; rest.replace(attr, function () { @@ -361,6 +354,14 @@ }); }); + if ( !unary ) { + stack.push( tagName ); + } + else { + unarySlash = tag.match( endingSlash ); + } + + if ( handler.start ) { handler.start( tagName, attrs, unary, unarySlash ); }