Skip to content

Use pattern value in the summary for the generated regex method. #96488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 17 commits into from

Conversation

pawchen
Copy link

@pawchen pawchen commented Jan 4, 2024

Fixes #94760

@ghost ghost added area-System.Text.RegularExpressions community-contribution Indicates that the PR has been added by a community member labels Jan 4, 2024
@ghost
Copy link

ghost commented Jan 4, 2024

Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #94760

Author: pawchen
Assignees: -
Labels:

area-System.Text.RegularExpressions

Milestone: -

@pawchen
Copy link
Author

pawchen commented Jan 5, 2024

OK, so we're failing the tests with special chars that are not valid XML chars in the pattern, such as 0x00 and 0xFFFF. I think we should use the Regex escape syntax (\unnnn) for those, which happens to be the same C# string escape syntax that was handled by Literal(..).

@pawchen
Copy link
Author

pawchen commented Jan 6, 2024

The current logic is not quite correct for RegexOptions.IgnorePatternWhitespace, please don't merge yet.

@pawchen pawchen marked this pull request as draft January 6, 2024 14:01
@pawchen
Copy link
Author

pawchen commented Jan 9, 2024

Wrong direction. As the IgnorePatternWhitespace option can be inlined and being on and off through the pattern. Closing.

@pawchen pawchen closed this Jan 9, 2024
@stephentoub
Copy link
Member

Thanks, anyway, for your efforts.

@pawchen
Copy link
Author

pawchen commented Jan 9, 2024

@stephentoub You're welcome. It's a good lesson for me to know the Regex better.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.RegularExpressions community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Escaped pattern in the summary of GeneratedRegex
2 participants