lib/ragabash/awesome_string_formatter.rb
def awesome_string(string)
      lexers = ::Rouge::Guessers::Source.new(string).filter(R_LEXERS)
      if !lexers.empty?
        format_syntax_string(string, lexers.first)
      elsif string =~ /(?:\r?\n)(?!\z)/
        format_multiline_string(string)
      else
        format_plain_string(string)
      end
    end
def awesome_string(string)
      lexers = ::Rouge::Guessers::Source.new(string).filter(R_LEXERS)
      if !lexers.empty?
        format_syntax_string(string, lexers.first)
      elsif string =~ /(?:\r?\n)(?!\z)/
        format_multiline_string(string)
      else
        format_plain_string(string)
      end
    end
def awesome_string ( string ) lexers = :: Rouge :: Guessers :: Source . new ( string ) . filter ( R_LEXERS ) if ! lexers . empty? format_syntax_string ( string , lexers . first ) elsif string =~ / \r \n \z / format_multiline_string ( string ) else format_plain_string ( string ) end end
Format a String for awesome_print display.

 @param string [String] the String to format
 @return [String] the formatted String
Format a String for awesome_print display .