File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
projects/igniteui-angular/migrations/common Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ describe('UpdateChanges', () => {
65
65
'test2.component.html' ,
66
66
'<igx-remove attr></igx-remove><igx-component>'
67
67
) ;
68
+ appTree . create (
69
+ 'test3.component.html' ,
70
+ '<igx-remove-me-not attr></igx-remove-me-not> <igx-component> <igx-component-child></igx-component-child> </igx-component>'
71
+ ) ;
68
72
69
73
const update = new UnitUpdateChanges ( __dirname , appTree ) ;
70
74
expect ( fs . existsSync ) . toHaveBeenCalledWith ( jsonPath ) ;
@@ -74,6 +78,9 @@ describe('UpdateChanges', () => {
74
78
update . applyChanges ( ) ;
75
79
expect ( appTree . readContent ( 'test.component.html' ) ) . toEqual ( '<igx-replaced> <content> </igx-replaced> ' ) ;
76
80
expect ( appTree . readContent ( 'test2.component.html' ) ) . toEqual ( '<igx-replaced>' ) ;
81
+ expect ( appTree . readContent ( 'test3.component.html' ) ) . toEqual (
82
+ '<igx-remove-me-not attr></igx-remove-me-not> <igx-replaced> <igx-component-child></igx-component-child> </igx-replaced>'
83
+ ) ;
77
84
done ( ) ;
78
85
} ) ;
79
86
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ export class UpdateChanges {
198
198
regSource = String . raw `\<${ change . selector } [\s\S]*?\<\/${ change . selector } \>` ;
199
199
replace = '' ;
200
200
} else {
201
- regSource = String . raw `\<(\/?)${ change . selector } ` ;
201
+ regSource = String . raw `\<(\/?)${ change . selector } (?=[\s\>]) ` ;
202
202
replace = `<$1${ change . replaceWith } ` ;
203
203
}
204
204
break ;
You can’t perform that action at this time.
0 commit comments