From 9d5f0ce10be11f505b52d78c797bea87196e03e0 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Wed, 6 Nov 2013 16:43:48 +0100 Subject: [PATCH] trim lines --- Twilight/colors/twilight_unicorn.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Twilight/colors/twilight_unicorn.php b/Twilight/colors/twilight_unicorn.php index 7ce7117..fc19f8f 100755 --- a/Twilight/colors/twilight_unicorn.php +++ b/Twilight/colors/twilight_unicorn.php @@ -11,8 +11,9 @@ foreach($dir_files as $file) { $curr_file = file("$dir/$file",FILE_IGNORE_NEW_LINES); $files[$file] = $curr_file; - foreach($curr_file as $line) + foreach($curr_file as &$line) { + $line = rtrim($line); $w = strlen($line); if ( $w> $maxw ) $maxw = $w;