RedCloth attribute :hard_break set to true to keep line breaks

git-svn-id: http://redmine.rubyforge.org/svn/trunk@421 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-04-04 22:16:17 +00:00
parent 46d67cb349
commit 9cf96580bf
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ module ApplicationHelper
# finally textilize text # finally textilize text
@do_textilize ||= (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") @do_textilize ||= (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize")
text = @do_textilize ? auto_link(RedCloth.new(text).to_html) : simple_format(auto_link(h(text))) text = @do_textilize ? auto_link(RedCloth.new(text, [:hard_breaks]).to_html) : simple_format(auto_link(h(text)))
end end
def error_messages_for(object_name, options = {}) def error_messages_for(object_name, options = {})