File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/libraries/System.Text.RegularExpressions/gen Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -303,13 +303,13 @@ static RegexOptions GetRegexOptionsFromArgument(ImmutableArray<IArgumentOperatio
303
303
// For patterns, let the normal logic below handle the formatting
304
304
}
305
305
306
- // Handle literal operations for pattern
307
- if ( parameterName == UpgradeToGeneratedRegexAnalyzer . PatternArgumentName && argument . Value is ILiteralOperation literalOperation )
306
+ // Handle literal operations for both pattern and options
307
+ if ( argument . Value is ILiteralOperation literalOperation )
308
308
{
309
309
return literalOperation . Syntax ;
310
310
}
311
311
312
- // Handle options
312
+ // Handle options that are not literal operations
313
313
if ( parameterName == UpgradeToGeneratedRegexAnalyzer . OptionsArgumentName )
314
314
{
315
315
// For RegexOptions that are not constant field references, expand the value
You can’t perform that action at this time.
0 commit comments