-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
fix: Strip left spaces from opening tags when comparing output for changes #5701
fix: Strip left spaces from opening tags when comparing output for changes #5701
Conversation
…anges Spaces removed from before opening tags in both the original and new content. Fixes: rectorphp/rector#8533
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
…re regex first as it can be a little slower
Hi @samsonasik |
Thanks @samsonasik, just pushed a fix for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
@TomasVotruba let's merge it, thank you @stilliard |
When checking for changes, spaces can be temp removed from before the opening PHP tags in both the original and new content to cut down on whitespace only changes.
Fixes: rectorphp/rector#8533
Should be safe & unit tests pass, however I could wrap this in a config check and make it an opt in thing to ignore whitespace before opening tags if needed?
Let me know what you think, thanks.