Skip to content

Commit

Permalink
only require redcloth/bluecloth if they are not already loaded [Rick]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4257 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
technoweenie committed Apr 23, 2006
1 parent e1c7b5a commit a9e02fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/action_view/helpers/text_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def word_wrap(text, line_width = 80)
end

begin
require_library_or_gem "redcloth"
require_library_or_gem "redcloth" unless Object.const_defined?(:RedCloth)

# Returns the text with all the Textile codes turned into HTML-tags.
# <i>This method is only available if RedCloth can be required</i>.
Expand All @@ -104,7 +104,7 @@ def textilize_without_paragraph(text)
end

begin
require_library_or_gem "bluecloth"
require_library_or_gem "bluecloth" unless Object.const_defined?(:BlueCloth)

# Returns the text with all the Markdown codes turned into HTML-tags.
# <i>This method is only available if BlueCloth can be required</i>.
Expand Down

0 comments on commit a9e02fd

Please sign in to comment.