File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ function postHTMLParser(html, options) {
48
48
function normalizeArributes ( attrs ) {
49
49
var result = { } ;
50
50
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 ) ;
52
54
} ) ;
53
55
54
56
return result ;
@@ -68,7 +70,7 @@ function postHTMLParser(html, options) {
68
70
last . content || ( last . content = [ ] ) ;
69
71
last . content . push ( comment ) ;
70
72
} ,
71
- onopentag : function ( tag , attrs ) {
73
+ onopentag : function ( tag ) {
72
74
var buf = { tag : tag } ;
73
75
74
76
if ( Object . keys ( bufAttributes ) . length ) {
@@ -79,7 +81,9 @@ function postHTMLParser(html, options) {
79
81
bufArray . push ( buf ) ;
80
82
} ,
81
83
onattribute : function ( name , value ) {
82
- Object . assign ( bufAttributes , { [ name ] : value } ) ;
84
+ var obj = { } ;
85
+ obj [ name ] = value ;
86
+ Object . assign ( bufAttributes , obj ) ;
83
87
} ,
84
88
onclosetag : function ( ) {
85
89
var buf = bufArray . pop ( ) ;
You can’t perform that action at this time.
0 commit comments