Sha256: 9a020b7f551f7680b0b83dc0a2229f6393dfb9ca3fa3b0e3563cedbacd780346

Contents?: true

Size: 589 Bytes

Versions: 20

Compression:

Stored size: 589 Bytes

Contents

# encoding: utf-8

require "rango/helpers"

module Rango
  module Helpers
    # @since 0.0.1
    def textile(text)
      require "redcloth"
      RedCloth.new(text).to_html
    end

    # @since 0.0.1
    def markdown(text)
      require "bluecloth"
    end

    # @since 0.0.1
    def maruku(text, options = Hash.new)
      require "maruku"
    end

    # @since 0.0.1
    def syntax(text, options = Hash.new)
      require "syntax/convertors/html"
      convertor = Syntax::Convertors::HTML.for_syntax(options[:language] || "ruby")
      convertor.convert(text, false)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rango-0.2.3 lib/rango/helpers/syntax.rb
rango-0.2.1 lib/rango/helpers/syntax.rb
rango-0.2.1.pre lib/rango/helpers/syntax.rb
rango-0.2 lib/rango/helpers/syntax.rb
rango-0.1.1.3 lib/rango/helpers/syntax.rb
rango-0.1.1.2.11 lib/rango/helpers/syntax.rb
rango-0.1.1.2.10 lib/rango/helpers/syntax.rb
rango-0.1.1.2.9 lib/rango/helpers/syntax.rb
rango-0.1.1.2.8 lib/rango/helpers/syntax.rb
rango-0.1.1.2.7 lib/rango/helpers/syntax.rb
rango-0.1.1.2.6 lib/rango/helpers/syntax.rb
rango-0.1.1.2.5 lib/rango/helpers/syntax.rb
rango-0.1.1.2.4 lib/rango/helpers/syntax.rb
rango-0.1.1.2.3 lib/rango/helpers/syntax.rb
rango-0.1.1.2.2 lib/rango/helpers/syntax.rb
rango-0.1.1.2.1 lib/rango/helpers/syntax.rb
rango-0.2.pre lib/rango/helpers/syntax.rb
rango-0.1.1.2 lib/rango/helpers/syntax.rb
rango-0.1.1.1 lib/rango/helpers/syntax.rb
rango-0.1.1 lib/rango/helpers/syntax.rb