Sha256: 142b6b02021c1a0bac1eb1455b55907139e6d9e382df512851d097a08c198eca

Contents?: true

Size: 1.29 KB

Versions: 25

Compression:

Stored size: 1.29 KB

Contents

# If this is a frozen gem in Rails 2.1 and RedCloth 3.x was already
# loaded by Rails' ActionView::Helpers::TextHelper, the user will get
# "redcloth_scan.bundle: Class is not a module (TypeError)"
# This hack is to work around that Rails loading problem.  The problem
# appears to be fixed in Edge Rails [51e4106].
Object.send(:remove_const, :RedCloth) if Object.const_defined?(:RedCloth) && RedCloth.is_a?(Class)

require 'rbconfig'
begin
  prefix = Config::CONFIG['arch'] =~ /mswin|mingw/ ? "#{Config::CONFIG['MAJOR']}.#{Config::CONFIG['MINOR']}/" : ''
  lib = "#{prefix}redcloth_scan"
  require lib
rescue LoadError => e
  e.message << %{\nCouldn't load #{lib}\nThe $LOAD_PATH was:\n#{$LOAD_PATH.join("\n")}}
  raise e
end

require 'redcloth/version'
require 'redcloth/textile_doc'
require 'redcloth/formatters/base'
require 'redcloth/formatters/html'
require 'redcloth/formatters/latex'

module RedCloth
  
  # A convenience method for creating a new TextileDoc. See
  # RedCloth::TextileDoc.
  def self.new( *args, &block )
    RedCloth::TextileDoc.new( *args, &block )
  end
  
  # Include extension modules (if any) in TextileDoc.
  def self.include(*args)
    RedCloth::TextileDoc.send(:include, *args)
  end
  
end

begin
  require 'erb'
  require 'redcloth/erb_extension'
  include ERB::Util
rescue LoadError
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
assplecake-RedCloth-4.2.9 lib/redcloth.rb
assplecake-RedCloth-4.2.8 lib/redcloth.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/RedCloth-4.2.7/lib/redcloth.rb
RedCloth-4.2.8 lib/redcloth.rb
RedCloth-4.2.7-x86-mswin32-60 lib/redcloth.rb
RedCloth-4.2.7-x86-mingw32 lib/redcloth.rb
RedCloth-4.2.7-java lib/redcloth.rb
RedCloth-4.2.7 lib/redcloth.rb
RedCloth-4.2.5-x86-mswin32-60 lib/redcloth.rb
RedCloth-4.2.5-x86-mingw32 lib/redcloth.rb
RedCloth-4.2.5-java lib/redcloth.rb
RedCloth-4.2.5 lib/redcloth.rb
RedCloth-4.2.4-x86-mswin32-60 lib/redcloth.rb
RedCloth-4.2.4-x86-mingw32 lib/redcloth.rb
RedCloth-4.2.4-java lib/redcloth.rb
RedCloth-4.2.4 lib/redcloth.rb
RedCloth-4.2.4.pre3-x86-mswin32-60 lib/redcloth.rb
RedCloth-4.2.4.pre3-x86-mingw32 lib/redcloth.rb
RedCloth-4.2.4.pre3-java lib/redcloth.rb
RedCloth-4.2.4.pre3 lib/redcloth.rb