Skip to content

Commit

Permalink
remove linebreaks from list command
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Winkens <m.winkens@fz-juelich.de>
  • Loading branch information
mwinkens committed Jul 30, 2024
1 parent 9c9b144 commit ada76fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Command/AnnouncementList.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

private function ellipseAndPadText(string $text, int $width, string $sep = " "): string {
$text = str_replace(array("\r", "\n"), ' ', $text);
$text = str_pad($text, $width, $sep, STR_PAD_RIGHT);
$text = strlen($text) > $width ? substr($text, 0, $width - 2) . "" : $text;
return $text;
Expand Down

0 comments on commit ada76fa

Please sign in to comment.