Sha256: 645b03cb3b534a7deea4c9854bd1f97720a0ca268f3bc356177d750338265457

Contents?: true

Size: 637 Bytes

Versions: 10

Compression:

Stored size: 637 Bytes

Contents

module Jekyll

  class TextileConverter < Converter
    safe true

    pygments_prefix '<notextile>'
    pygments_suffix '</notextile>'

    def setup
      return if @setup
      require 'redcloth'
      @setup = true
    rescue LoadError
      STDERR.puts 'You are missing a library required for Textile. Please run:'
      STDERR.puts '  $ [sudo] gem install RedCloth'
      raise FatalException.new("Missing dependency: RedCloth")
    end

    def matches(ext)
      ext =~ /textile/i
    end

    def output_ext(ext)
      ".html"
    end

    def convert(content)
      setup
      RedCloth.new(content).to_html
    end
  end

end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
fagiani-jekyll-0.10.1 lib/jekyll/converters/textile.rb
jekyll-0.10.0 lib/jekyll/converters/textile.rb
jekyll-0.9.0 lib/jekyll/converters/textile.rb
jekyll-0.8.0 lib/jekyll/converters/textile.rb
realityforge-jekyll-0.7.1-java lib/jekyll/converters/textile.rb
jekyll-0.7.0 lib/jekyll/converters/textile.rb
cartera-jekyll-0.6.2 lib/jekyll/converters/textile.rb
jekyll-0.6.2 lib/jekyll/converters/textile.rb
jekyll-0.6.1 lib/jekyll/converters/textile.rb
jekyll-0.6.0 lib/jekyll/converters/textile.rb