ruby_cowsay icon indicating copy to clipboard operation
ruby_cowsay copied to clipboard

Multiline text doesn't format correctly

Open tas50 opened this issue 11 years ago • 2 comments

First off I want to say this gem is awesome. It's a ton of fun and I'd really love to get some nice multi-line motd action going on via Chef on my servers. Unfortunately the text doesn't seem to format quite right with newlines. Any chance it would be simple to add some parsing for multiline text?

irb(main):006:0> puts Cow.new.say("Fun text\nOften spans lines")
 ____________________________
< Fun text
Often spans lines >
 ----------------------------
      \   ^__^
       \  (oo)\_______
          (__)\       )\/\
              ||----w |
              ||     ||

tas50 avatar Oct 01 '14 03:10 tas50

Hmm. It does handle text wrapping automatically but I've never had to handle cases with line breaks already in the text. Shouldn't be too hard to implement.

PatrickTulskie avatar Oct 01 '14 13:10 PatrickTulskie

I need this as well

dbwest avatar Jun 23 '17 20:06 dbwest