def wrap_formatted_text(string, indent = 0, width = 80)
      paragraphs = strip_heredoc(string).split("\n\n")
      paragraphs = paragraphs.map do |paragraph|
        if paragraph.start_with?(' ' * 4)
          paragraphs.gsub!(/\n/, "\n#{' ' * indent}")
        else
          paragraph = wrap_with_indent(paragraph, indent, width)
        end
        paragraph.insert(0, ' ' * indent).rstrip
      end
      paragraphs.join("\n\n")
    end
def wrap_formatted_text(string, indent = 0, width = 80)
      paragraphs = strip_heredoc(string).split("\n\n")
      paragraphs = paragraphs.map do |paragraph|
        if paragraph.start_with?(' ' * 4)
          paragraphs.gsub!(/\n/, "\n#{' ' * indent}")
        else
          paragraph = wrap_with_indent(paragraph, indent, width)
        end
        paragraph.insert(0, ' ' * indent).rstrip
      end
      paragraphs.join("\n\n")
    end
@return [String] Wraps a formatted string (e.g. markdown) by stripping
          heredoc indentation and wrapping by word to the terminal width
          taking into account a maximum one, and indenting the string.
          Code lines (i.e. indented by four spaces) are not wrapped.

 @param   [String] string
        The string to format.

 @param    [Fixnum] indent
          The number of spaces to insert before the string.

 @param   [Fixnum] width
         The width to use to format the string if the terminal
         is too wide.