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
Resizetizer Regex Fix #19600
Resizetizer Regex Fix #19600
Conversation
dotnet#19574 Fixed Resizetizer Regex not allowing single letter characters. "a" I also fixed another part of the regex where a the following input was allowed when it shouldnt have. "a=" The regex is based off the error given by regex. Requirements are: 1. First char should be a lowercase letter between a-z 2. The rest can be a lowercase letter or a number 0-9 or an underscore. 3. Lastly, the last character is NOT an underscore.
Resizetizer Regex Fix
Hey there @Xenooooon! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
@mattleibow any particular reason this was done? |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
This was done because I understand all the simple and non-dodgy concepts about regex. 🤣 @Xenooooon thanks for the change! Is it possible to add some of your test cases to src\SingleProject\Resizetizer\test\UnitTests\FilenameTests.cs? |
@dotnet-policy-service agree |
@mattleibow Done! |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
#19574
Fixed Resizetizer Regex not allowing single letter characters. "a"
I also fixed another part of the regex where a the following input was allowed when it shouldnt have. "a="
The regex is based off the error given by regex. Requirements are:
Description of Change
Changed the regex from
^[a-z]+[a-z0-9_]{0,}[^_]$
to
^[a-z]([a-z0-9_]*[a-z0-9])?$
Issues Fixed
Fixes #19574