mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-18 22:39:44 +01:00
simplify trailing spaces
This commit is contained in:
parent
9443e51710
commit
e753c2238f
@ -52,10 +52,11 @@ final class MarkdownDifferAndFormatter
|
||||
return $diff;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes UnifiedDiffOutputBuilder generated pre-spaces " \n" => "\n"
|
||||
*/
|
||||
private function removeTrailingWhitespaces(string $diff): string
|
||||
{
|
||||
$diff = preg_replace('#\n( ){1,}\n#', PHP_EOL . PHP_EOL, $diff);
|
||||
|
||||
$diff = preg_replace('#( ){1,}\n#', PHP_EOL, $diff);
|
||||
|
||||
return rtrim($diff);
|
||||
|
Loading…
x
Reference in New Issue
Block a user