Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Dec 22, 2022

Given the following code:

    public function run2()
    {
        $content = 'some texte';
        $parts = preg_split("/\r\n|\r|\n/i", $content);
    }

It currently produce:

     public function run2()
     {
         $content = 'some texte';
-        $parts = preg_split("/\r\n|\r|\n/i", $content);
+        $parts = preg_split("#
||
+#i", $content);

Ref https://getrector.org/demo/94c2d1af-be82-478a-ae1b-a44783a1f741

It should be skipped instead.

@samsonasik
Copy link
Member Author

Fixed 🎉

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit 3c168f0 into main Dec 22, 2022
@TomasVotruba TomasVotruba deleted the skip-new-line-i branch December 22, 2022 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants