def markdown(text, *options)
      text = h(text) unless text.html_safe? || options.delete(:safe)
      
      if text.blank?
        ""
      else
        markdowned = RDiscount.new(text, *options)
        markdowned.to_html.chomp #used chomp to remove the \n appended by RDiscount
      end.html_safe
    end
def markdown(text, *options)
      text = h(text) unless text.html_safe? || options.delete(:safe)
      
      if text.blank?
        ""
      else
        markdowned = RDiscount.new(text, *options)
        markdowned.to_html.chomp #used chomp to remove the \n appended by RDiscount
      end.html_safe
    end
Returns the text with all the Markdown codes turned into HTML tags.
 <i>This method requires RDiscount[http://github.com/rtomayko/rdiscount/]
 to be available</i>.

 ==== Examples
   markdown("We are using __Markdown__ now!")
   # => "<p>We are using <strong>Markdown</strong> now!</p>"

   markdown("We like to _write_ `code`, not just _read_ it!")
   # => "<p>We like to <em>write</em> <code>code</code>, not just <em>read</em> it!</p>"

   markdown("The [Markdown website](http://daringfireball.net/projects/markdown/) has more information.")
   # => "<p>The <a href="http://daringfireball.net/projects/markdown/">Markdown website</a>
   #     has more information.</p>"

   markdown('![The ROR logo](http://rubyonrails.com/images/rails.png "Ruby on Rails")')
   # => '<p><img src="http://rubyonrails.com/images/rails.png" alt="The ROR logo" title="Ruby on Rails" /></p>'