Method: Lucid::Formatter::Console#linebreaks
- Defined in:
- lib/lucid/formatter/console.rb
#linebreaks(s, max) ⇒ Object
112 113 114 |
# File 'lib/lucid/formatter/console.rb', line 112 def linebreaks(s, max) s.gsub(/.{1,#{max}}(?:\s|\Z)/){($& + 5.chr).gsub(/\n\005/,"\n").gsub(/\005/,"\n")}.rstrip end |