File tree 1 file changed +3
-3
lines changed
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
22
22
const content = await vscode . workspace . fs . readFile ( csprojFile ) ;
23
23
const csprojContent = content . toString ( ) ;
24
24
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' ) ;
27
27
const match = regex . exec ( csprojContent ) ;
28
28
29
29
if ( match ) {
30
30
const itemContent = match [ 1 ] ;
31
31
// 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;
33
33
const generatorMatch = generatorRegex . exec ( itemContent ) ;
34
34
35
35
if ( generatorMatch ) {
You can’t perform that action at this time.
0 commit comments