File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ export class HTMLElement extends Node {
460460 return this . _rawAttrs ;
461461 const attrs = { } as RawAttributes ;
462462 if ( this . rawAttrs ) {
463- const re = / \b ( [ a - z ] [ a - z 0 - 9 \- ] * ) (?: \s * = \s * (?: " ( [ ^ " ] + ) " | ' ( [ ^ ' ] + ) ' | ( \S + ) ) ) ? / ig;
463+ const re = / \b ( [ a - z ] [ a - z 0 - 9 \- ] * ) (?: \s * = \s * (?: " ( [ ^ " ] * ) " | ' ( [ ^ ' ] * ) ' | ( \S + ) ) ) ? / ig;
464464 let match : RegExpExecArray ;
465465 while ( match = re . exec ( this . rawAttrs ) ) {
466466 attrs [ match [ 1 ] ] = match [ 2 ] || match [ 3 ] || match [ 4 ] || "" ;
Original file line number Diff line number Diff line change @@ -264,12 +264,13 @@ describe('HTML Parser', function () {
264264
265265 describe ( '#attributes' , function ( ) {
266266 it ( 'should return attributes of the element' , function ( ) {
267- var root = parseHTML ( '<p a=12 data-id="!$$&" yAz=\'1\' disabled></p>' ) ;
267+ var root = parseHTML ( '<p a=12 data-id="!$$&" yAz=\'1\' class="" disabled></p>' ) ;
268268 root . firstChild . attributes . should . eql ( {
269269 'a' : '12' ,
270270 'data-id' : '!$$&' ,
271271 'yAz' : '1' ,
272- 'disabled' : ''
272+ 'disabled' : '' ,
273+ 'class' : ''
273274 } ) ;
274275 } ) ;
275276 } ) ;
You can’t perform that action at this time.
0 commit comments