Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Resolves: #357
Summary:
Update below regex to make it more efficient:
\r\n|\r|\n -> \r?\n|\r(?!\n)
The \r\n is redundant to \r checking in current pattern, and I think we can combine it with the \n checking by using \r?\n
At first, I want to also remove the standalone \r because it only for older Mac OS, but I think we should keep it for backward compatibility, so adding | \r to the pattern.
Additional (?!\n) in the end is to make sure the \r is not followed by \n, to avoid exponential backtracking on strings starting with ''' and containing many repetitions of '\r\n'. (per latest CodeQL analysis alert https://github.com/AlaskaAirlines/WC-Generator/security/code-scanning/3)
Type of change:
Please delete options that are not relevant.
[ ] New capability
[x] Revision of an existing capability
[ ] Infrastructure change (automation, etc.)
[ ] Other (please elaborate)
Checklist:
[x] My update follows the CONTRIBUTING guidelines of this project
[x] I have performed a self-review of my own update
By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team
Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Resolves: #357
Summary:
Type of change:
Please delete options that are not relevant.
Checklist:
By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team