Sha256: 6113f4fe02ff9bc2dc435fd16bf5f6881a3a40ab3562ff861f891c31c06c819f
Contents?: true
Size: 517 Bytes
Versions: 14
Compression:
Stored size: 517 Bytes
Contents
require 'action_mailer/vendor/text/format' module MailHelper#:nodoc: def block_format(text) formatted = text.split(/\n\r\n/).collect { |paragraph| Text::Format.new( :columns => 72, :first_indent => 2, :body_indent => 2, :text => paragraph ).format }.join("\n") # Make list points stand on their own line formatted.gsub!(/[ ]*([*]+) ([^*]*)/) { |s| " #{$1} #{$2.strip}\n" } formatted.gsub!(/[ ]*([#]+) ([^#]*)/) { |s| " #{$1} #{$2.strip}\n" } formatted end end
Version data entries
14 entries across 14 versions & 2 rubygems