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', () => {
6565 'test2.component.html' ,
6666 '<igx-remove attr></igx-remove><igx-component>'
6767 ) ;
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+ ) ;
6872
6973 const update = new UnitUpdateChanges ( __dirname , appTree ) ;
7074 expect ( fs . existsSync ) . toHaveBeenCalledWith ( jsonPath ) ;
@@ -74,6 +78,9 @@ describe('UpdateChanges', () => {
7478 update . applyChanges ( ) ;
7579 expect ( appTree . readContent ( 'test.component.html' ) ) . toEqual ( '<igx-replaced> <content> </igx-replaced> ' ) ;
7680 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+ ) ;
7784 done ( ) ;
7885 } ) ;
7986
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ export class UpdateChanges {
198198 regSource = String . raw `\<${ change . selector } [\s\S]*?\<\/${ change . selector } \>` ;
199199 replace = '' ;
200200 } else {
201- regSource = String . raw `\<(\/?)${ change . selector } ` ;
201+ regSource = String . raw `\<(\/?)${ change . selector } (?=[\s\>]) ` ;
202202 replace = `<$1${ change . replaceWith } ` ;
203203 }
204204 break ;
You can’t perform that action at this time.
0 commit comments