Skip to content

Commit

Permalink
Forced newer versions of RedCloth to use hard breaks [DHH]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Oct 2, 2005
1 parent e19bd16 commit 810ebf7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* Forced newer versions of RedCloth to use hard breaks [DHH]

* Added new scriptaculous options for auto_complete_field #2343 [m.stienstra@fngtps.com]

* Don't prepend the asset host if the string is already a fully-qualified URL
Expand Down
7 changes: 6 additions & 1 deletion actionpack/lib/action_view/helpers/text_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ def word_wrap(text, line_width = 80)
# 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.blank? ? "" : RedCloth.new(text, [ :hard_breaks ]).to_html
if text.blank?
""
else
textilized = RedCloth.new(text, [ :hard_breaks ])
textilized.hard_breaks = true if textilized.respond_to?("hard_breaks=")
textilized.to_html
end

# Returns the text with all the Textile codes turned into HTML-tags, but without the regular bounding <p> tag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ module ConnectionAdapters # :nodoc:
module DatabaseStatements
# Returns an array of record hashes with the column names as keys and
# column values as values.
def select_all(sql, name = nil) end
def select_all(sql, name = nil)
end

# Returns a record hash with the column names as keys and column values
# as values.
def select_one(sql, name = nil) end
def select_one(sql, name = nil)
end

# Returns a single value from a record
def select_value(sql, name = nil)
Expand Down

0 comments on commit 810ebf7

Please sign in to comment.