def reflow(width = 72, force = false, line_delim_regex = %r!^(<br[^/]*>|\.)$!)
text = ''
curr_line = ''
strip.split(/\s+/).each { |word|
if line_delim_regex && word =~ line_delim_regex
text << curr_line << "\n"
curr_line = ''
elsif curr_line.length + word.length > width
if curr_line.length > width and force
fline = curr_line[0, width - 2] << "\\\n"
text << fline
curr_line = curr_line[width - 2, curr_line.length]
else
text << curr_line << "\n"
curr_line = "#{word} "
end
else
curr_line << "#{word} "
end
}
text << curr_line << "\n"
text
end