mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Move from referencing the BlueCloth constant directly, to referencing Markdown.
This supports alternative implementations of markdown such as rpeg-markdown or rdiscount, and later releases of bluecloth. There are some performance issues with earlier releases of bluecloth, and you should probably upgrade. In the event that you can't you can place the following code into an initializer: Markdown = BlueCloth
This commit is contained in:
@@ -271,8 +271,8 @@ module ActionView
|
||||
end
|
||||
|
||||
# Returns the text with all the Markdown codes turned into HTML tags.
|
||||
# <i>This method requires BlueCloth[http://www.deveiate.org/projects/BlueCloth]
|
||||
# to be available</i>.
|
||||
# <i>This method requires BlueCloth[http://www.deveiate.org/projects/BlueCloth] or another
|
||||
# Markdown library to be installed.</i>.
|
||||
#
|
||||
# ==== Examples
|
||||
# markdown("We are using __Markdown__ now!")
|
||||
@@ -288,7 +288,7 @@ module ActionView
|
||||
# markdown('')
|
||||
# # => '<p><img src="http://rubyonrails.com/images/rails.png" alt="The ROR logo" title="Ruby on Rails" /></p>'
|
||||
def markdown(text)
|
||||
text.blank? ? "" : BlueCloth.new(text).to_html
|
||||
text.blank? ? "" : Markdown.new(text).to_html
|
||||
end
|
||||
|
||||
# Returns +text+ transformed into HTML using simple formatting rules.
|
||||
|
||||
Reference in New Issue
Block a user