From e7499638d06023ae493d14ec1dc4f58bad8ac168 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 19 Feb 2005 02:00:06 +0000 Subject: Use per-document setting for hardbreaks on textile git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/text_helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actionpack/lib/action_view') 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. # This method is only available if RedCloth can be required. 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

tag. -- cgit v1.2.3