diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-19 02:00:06 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-19 02:00:06 +0000 |
commit | e7499638d06023ae493d14ec1dc4f58bad8ac168 (patch) | |
tree | 50d1f1608d4c68902929f7b505be1edf5db175ec /actionpack | |
parent | cdd2e844a400ad2616cbaf24919d8af826c0b6c6 (diff) | |
download | rails-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')
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 3 |
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. |