Sha256: 67ecdcd7de5b9cb5e456d2aef4c74b75673a7b166652de8fa9e64470259adea5

Contents?: true

Size: 306 Bytes

Versions: 9

Compression:

Stored size: 306 Bytes

Contents

gem 'RedCloth'
require 'RedCloth'

module Snippets
  module Parsers
    class Textile
      def self.parse(text)
        textilized = RedCloth.new(text, [ :hard_breaks ])
        textilized.hard_breaks = true if textilized.respond_to?("hard_breaks=")
        textilized.to_html
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
djanowski-snippets-0.0.2 lib/snippets/parsers/textile.rb
djanowski-snippets-0.0.3 lib/snippets/parsers/textile.rb
djanowski-snippets-0.1.1 lib/snippets/parsers/textile.rb
djanowski-snippets-0.1.2 lib/snippets/parsers/textile.rb
djanowski-snippets-0.1.3 lib/snippets/parsers/textile.rb
djanowski-snippets-0.1.4 lib/snippets/parsers/textile.rb
djanowski-snippets-0.1.5 lib/snippets/parsers/textile.rb
djanowski-snippets-0.1.6 lib/snippets/parsers/textile.rb
djanowski-snippets-0.1 lib/snippets/parsers/textile.rb