Skip to content

Commit bceaae7

Browse files
authored
Fix centering ascii art
1 parent dc3a2b7 commit bceaae7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/MenuItem/AsciiArtItem.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ public function getRows(MenuStyle $style, bool $selected = false) : array
7373
break;
7474
case self::POSITION_CENTER:
7575
default:
76-
$row = rtrim($row);
77-
$padding = $padding - ($this->artLength - mb_strlen($row));
76+
$padding = $padding - ($this->artLength - $length);
7877
$left = ceil($padding/2);
7978
$right = $padding - $left;
8079
$row = sprintf('%s%s%s', str_repeat(' ', $left), $row, str_repeat(' ', $right));

0 commit comments

Comments
 (0)