Sha256: e979dbb1b06b319a825dd694501e6a84f6cf8eee991db365846f9bbb4d252e44

Contents?: true

Size: 813 Bytes

Versions: 4

Compression:

Stored size: 813 Bytes

Contents

require 'tilt/template'

module RevealCK
  module Markdown
    #
    # Public: This class allows SlideMarkdown to hook into Tilt 2.0. See
    # https://github.com/rtomayko/tilt.
    #
    class SlideMarkdownTemplate < ::Tilt::Template
      # Must be implemented by all subclasses of Tilt::Template
      def prepare
      end

      def evaluate(*)
        markdown = Redcarpet::Markdown.new(
                                           SlideMarkdown,
                                           fenced_code_blocks: true,
                                           tables: true,
                                           strikethrough: true,
                                           highlight: true
                                          )
        @output = markdown.render(data)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
reveal-ck-3.0.0 lib/reveal-ck/markdown/slide_markdown_template.rb
reveal-ck-0.6.2 lib/reveal-ck/markdown/slide_markdown_template.rb
reveal-ck-0.6.1 lib/reveal-ck/markdown/slide_markdown_template.rb
reveal-ck-0.6.0 lib/reveal-ck/markdown/slide_markdown_template.rb