File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 22 "name" : " ky-generator" ,
33 "displayName" : " KY-Generator" ,
44 "description" : " Visual Studio Code Extension for KY.Generator" ,
5- "version" : " 1.0.3 " ,
5+ "version" : " 1.0.4 " ,
66 "publisher" : " KY-Programming" ,
77 "icon" : " images/128.png" ,
88 "repository" : " https://github.com/KY-Programming/generator-vs-code" ,
Original file line number Diff line number Diff line change @@ -48,7 +48,17 @@ export function activate(context: vscode.ExtensionContext) {
4848 else {
4949 const start = content . indexOf ( '<Generator>' ) + 11 ;
5050 const end = content . indexOf ( '</Generator>' ) ;
51- const generatorNode = content . substring ( start , end ) ;
51+ let generatorNode = content . substring ( start , end ) ;
52+ while ( true ) {
53+ const commentStart = generatorNode . indexOf ( '<!--' ) ;
54+ const commentEnd = generatorNode . indexOf ( '-->' ) ;
55+ if ( commentStart >= 0 ) {
56+ generatorNode = generatorNode . substring ( 0 , commentStart ) + generatorNode . substring ( commentEnd + 3 ) ;
57+ }
58+ else {
59+ break ;
60+ }
61+ }
5262 const connectionStart = generatorNode . indexOf ( '<Connection>' ) + 12 ;
5363 const connectionEnd = generatorNode . indexOf ( '</Connection>' ) ;
5464 url = generatorNode . substring ( connectionStart , connectionEnd ) . trim ( ) ;
@@ -86,7 +96,9 @@ export function activate(context: vscode.ExtensionContext) {
8696 return Promise . all ( promises ) . then ( ( ) => filePaths . length ) ;
8797 } )
8898 . then ( ( count : number ) => {
89- vscode . window . showInformationMessage ( count + ' files generated' ) ;
99+ if ( count > 0 ) {
100+ vscode . window . showInformationMessage ( count + ' files generated' ) ;
101+ }
90102 } )
91103 . catch ( ( error : Error ) => {
92104 vscode . window . showErrorMessage ( 'Can not reach the generator server #231d\r\n' + error ) ;
You can’t perform that action at this time.
0 commit comments