aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-19 02:00:06 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-19 02:00:06 +0000
commite7499638d06023ae493d14ec1dc4f58bad8ac168 (patch)
tree50d1f1608d4c68902929f7b505be1edf5db175ec /actionpack/lib/action_view
parentcdd2e844a400ad2616cbaf24919d8af826c0b6c6 (diff)
downloadrails-e7499638d06023ae493d14ec1dc4f58bad8ac168.tar.gz
rails-e7499638d06023ae493d14ec1dc4f58bad8ac168.tar.bz2
rails-e7499638d06023ae493d14ec1dc4f58bad8ac168.zip
Use per-document setting for hardbreaks on textile
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 50d700f64a..ae65a1c2bd 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -65,12 +65,11 @@ module ActionView
begin
require "redcloth"
- class RedCloth; def hard_breaks() true end; end
# Returns the text with all the Textile codes turned into HTML-tags.
# <i>This method is only available if RedCloth can be required</i>.
def textilize(text)
- text.empty? ? "" : RedCloth.new(text).to_html
+ text.empty? ? "" : RedCloth.new(text, [ :hard_breaks ]).to_html
end
# Returns the text with all the Textile codes turned into HTML-tags, but without the regular bounding <p> tag.