Sha256: 117239c532a2e20689e4c743c20d1c5b8c81303698eb13a419b9132a7331fe78

Contents?: true

Size: 521 Bytes

Versions: 85

Compression:

Stored size: 521 Bytes

Contents

class ERB
  module Util

    #
    # A utility method for transforming Textile in _s_ to HTML.
    # 
    # 	require "erb"
    # 	include ERB::Util
    # 	
    # 	puts textilize("Isn't ERB *great*?")
    # 
    # _Generates_
    # 
    # 	<p>Isn&#8217;t <span class="caps">ERB</span> <strong>great</strong>?</p>
    #
    def textilize( s )
      if s && s.respond_to?(:to_s)
        RedCloth.new( s.to_s ).to_html
      end
    end

    alias t textilize
    module_function :t
    module_function :textilize

  end
end

Version data entries

85 entries across 85 versions & 9 rubygems

Version Path
BBRedCloth-0.8.2 lib/redcloth/erb_extension.rb
BBRedCloth-0.8.1 lib/redcloth/erb_extension.rb
RedCloth-4.2.7-x86-mswin32-60 lib/redcloth/erb_extension.rb
RedCloth-4.2.7-x86-mingw32 lib/redcloth/erb_extension.rb
RedCloth-4.2.7-java lib/redcloth/erb_extension.rb
RedCloth-4.2.7 lib/redcloth/erb_extension.rb
RedCloth-4.2.5-x86-mswin32-60 lib/redcloth/erb_extension.rb
RedCloth-4.2.5-x86-mingw32 lib/redcloth/erb_extension.rb
RedCloth-4.2.5-java lib/redcloth/erb_extension.rb
RedCloth-4.2.5 lib/redcloth/erb_extension.rb
RedCloth-4.2.4-x86-mswin32-60 lib/redcloth/erb_extension.rb
RedCloth-4.2.4-x86-mingw32 lib/redcloth/erb_extension.rb
RedCloth-4.2.4-java lib/redcloth/erb_extension.rb
RedCloth-4.2.4 lib/redcloth/erb_extension.rb
RedCloth-4.2.4.pre3-x86-mswin32-60 lib/redcloth/erb_extension.rb
RedCloth-4.2.4.pre3-x86-mingw32 lib/redcloth/erb_extension.rb
RedCloth-4.2.4.pre3-java lib/redcloth/erb_extension.rb
RedCloth-4.2.4.pre3 lib/redcloth/erb_extension.rb
RedCloth-4.2.4.pre2-x86-mswin32-60 lib/redcloth/erb_extension.rb
RedCloth-4.2.4.pre2-x86-mingw32 lib/redcloth/erb_extension.rb