Skip to content

Conversation

@Lynesth
Copy link
Collaborator

@Lynesth Lynesth commented May 5, 2018

Centering ascii art where some lines have trailing spaces are all messed up. This fixes it.
Example of what doesn't work before the fix (select with mouse to see trailing white space):

$art = <<<ART
        _ __ _        
       / |..| \       
       \/ || \/       
        |_''_|        
      PHP SCHOOL      
LEARNING FOR ELEPHANTS
ART;

// What centering actually outputs in a 76 columns width menu:
                               _ __ _                       
                               / |..| \                       
                               \/ || \/                       
                               |_''_|                       
                              PHP SCHOOL                        
                           LEARNING FOR ELEPHANTS                           

Doesn't affect anything else.

@codecov-io
Copy link

codecov-io commented May 5, 2018

Codecov Report

Merging #102 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #102      +/-   ##
============================================
- Coverage     96.68%   96.68%   -0.01%     
  Complexity      293      293              
============================================
  Files            22       22              
  Lines           905      904       -1     
============================================
- Hits            875      874       -1     
  Misses           30       30
Impacted Files Coverage Δ Complexity Δ
src/MenuItem/AsciiArtItem.php 100% <100%> (ø) 14 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc3a2b7...cbad9d2. Read the comment docs.

@AydinHassan
Copy link
Member

Thanks! could you maybe add the example you gave as a unit test ?

@Lynesth
Copy link
Collaborator Author

Lynesth commented May 5, 2018

Done !

@AydinHassan AydinHassan merged commit 5c0b307 into php-school:master May 6, 2018
@AydinHassan AydinHassan added this to the 3.0 milestone May 7, 2018
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