Sha256: d1c622cd0233c78bfc306af8b373dffd4ce7454f7f7958a52c6a00cdd89f4bc9

Contents?: true

Size: 448 Bytes

Versions: 16

Compression:

Stored size: 448 Bytes

Contents

require 'tilt/template'
require 'pandoc'

module Tilt
  # Pandoc reStructuredText implementation. See:
  # http://pandoc.org/
  class RstPandocTemplate < PandocTemplate
    self.default_mime_type = 'text/html'

    def prepare
      @engine = PandocRuby.new(data, :f => "rst")
      @output = nil
    end

    def evaluate(scope, locals, &block)
      @output ||= @engine.to_html.strip
    end

    def allows_script?
      false
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
brakeman-6.1.2 bundle/ruby/3.3.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
brakeman-6.1.1 bundle/ruby/3.0.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
brakeman-6.1.0 bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
brakeman-6.0.1 bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
brakeman-6.0.0 bundle/ruby/3.0.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
brakeman-5.4.1 bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
brakeman-5.4.0 bundle/ruby/2.7.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
brakeman-5.3.1 bundle/ruby/2.7.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
brakeman-5.3.0 bundle/ruby/2.7.0/gems/tilt-2.0.11/lib/tilt/rst-pandoc.rb
tilt-2.0.11 lib/tilt/rst-pandoc.rb