Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/edraut/redcloth into edraut…
Browse files Browse the repository at this point in the history
…/master
  • Loading branch information
jgarber committed Sep 30, 2008
2 parents 8c3d68a + 6d2af63 commit f32da11
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/redcloth.rb
Expand Up @@ -29,3 +29,16 @@ def self.include(*args)

end

class ERB
module Util
def redcloth_escape( s )
RedCloth.new( s.to_s ).to_html if s and s.respond_to? :to_s and s.to_s
end

alias r redcloth_escape
module_function :f # this voodoo makes the method available to instances of ERB as a private method
module_function :redcloth_escape # ditto for the textile method
end
end


0 comments on commit f32da11

Please sign in to comment.