File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -742,7 +742,7 @@ function startingTag(element) {
742
742
// are not allowed to have children. So we just ignore it.
743
743
element . html ( '' ) ;
744
744
} catch ( e ) { } ;
745
- return jqLite ( '<div>' ) . append ( element ) . html ( ) . replace ( / \< \/ [ \w \: \- ] + \> $ / , '' ) ;
745
+ return jqLite ( '<div>' ) . append ( element ) . html ( ) . match ( / ^ ( < [ ^ > ] + > ) / ) [ 1 ] ;
746
746
}
747
747
748
748
Original file line number Diff line number Diff line change @@ -512,7 +512,8 @@ describe('angular', function() {
512
512
513
513
describe ( 'startingElementHtml' , function ( ) {
514
514
it ( 'should show starting element tag only' , function ( ) {
515
- expect ( startingTag ( '<ng-abc x="2"><div>text</div></ng-abc>' ) ) . toEqual ( '<ng-abc x="2">' ) ;
515
+ expect ( startingTag ( '<ng-abc x="2A"><div>text</div></ng-abc>' ) ) .
516
+ toBeOneOf ( '<ng-abc x="2A">' , '<NG-ABC x="2A">' ) ;
516
517
} ) ;
517
518
} ) ;
518
519
You can’t perform that action at this time.
0 commit comments