File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ async function checkResxGeneratorType(resxPath: string): Promise<'public' | 'int
2222 const content = await vscode . workspace . fs . readFile ( csprojFile ) ;
2323 const csprojContent = content . toString ( ) ;
2424
25- // Use regex to find EmbeddedResource items with our RESX file
26- const regex = new RegExp ( `<EmbeddedResource\\s+Include=["'](?:[^"']*[\\\\/])?${ escapeRegExp ( resxFileName ) } ["'][^>]*>([\\s\\S]*?)</EmbeddedResource>` , 'i' ) ;
25+ // Use regex to find EmbeddedResource items with our RESX file using either Include or Update attributes
26+ const regex = new RegExp ( `<EmbeddedResource\\s+(?: Include|Update) =["'](?:[^"']*[\\\\/])?${ escapeRegExp ( resxFileName ) } ["'][^>]*>([\\s\\S]*?)</EmbeddedResource>` , 'i' ) ;
2727 const match = regex . exec ( csprojContent ) ;
2828
2929 if ( match ) {
3030 const itemContent = match [ 1 ] ;
3131 // Look for Generator metadata within the EmbeddedResource element
32- const generatorRegex = / < G e n e r a t o r > ( [ ^ < ] + ) < \/ G e n e r a t o r > / i;
32+ const generatorRegex = / < G e n e r a t o r > \s * ( [ ^ < ] + ? ) \s * < \/ G e n e r a t o r > / i;
3333 const generatorMatch = generatorRegex . exec ( itemContent ) ;
3434
3535 if ( generatorMatch ) {
You can’t perform that action at this time.
0 commit comments