File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ function postHTMLParser(html, options) {
4848 function normalizeArributes ( attrs ) {
4949 var result = { } ;
5050 Object . keys ( attrs ) . forEach ( function ( key ) {
51- Object . assign ( result , { [ key ] : attrs [ key ] . replace ( / & q u o t ; / g, '"' ) } ) ;
51+ var obj = { } ;
52+ obj [ key ] = attrs [ key ] . replace ( / & q u o t ; / g, '"' ) ;
53+ Object . assign ( result , obj ) ;
5254 } ) ;
5355
5456 return result ;
@@ -68,7 +70,7 @@ function postHTMLParser(html, options) {
6870 last . content || ( last . content = [ ] ) ;
6971 last . content . push ( comment ) ;
7072 } ,
71- onopentag : function ( tag , attrs ) {
73+ onopentag : function ( tag ) {
7274 var buf = { tag : tag } ;
7375
7476 if ( Object . keys ( bufAttributes ) . length ) {
@@ -79,7 +81,9 @@ function postHTMLParser(html, options) {
7981 bufArray . push ( buf ) ;
8082 } ,
8183 onattribute : function ( name , value ) {
82- Object . assign ( bufAttributes , { [ name ] : value } ) ;
84+ var obj = { } ;
85+ obj [ name ] = value ;
86+ Object . assign ( bufAttributes , obj ) ;
8387 } ,
8488 onclosetag : function ( ) {
8589 var buf = bufArray . pop ( ) ;
You can’t perform that action at this time.
0 commit comments