Prevent Rails console from removing consecutive linebreaks

28 Views Asked by At

I'd like to prevent the Rails console from removing consecutive linebreaks:

CoolApp (PRODUCTION) > a = '
CoolApp (PRODUCTION) " hi
CoolApp (PRODUCTION) " 
CoolApp (PRODUCTION) " 
CoolApp (PRODUCTION) " hi'
=> "\nhi\nhi"

Does anyone know how I can do it? The string above should be "\nhi\n\n\nhi"

1

There are 1 best solutions below

0
duhaime On

Seems like entering a single space on each new line will preserve that line's linebreak :)