Sha256: bff37d621973776b07f5a844f1120384b51590245f6664d8a88d7c22bace0a67

Contents?: true

Size: 339 Bytes

Versions: 2

Compression:

Stored size: 339 Bytes

Contents

require 'bluecloth'

module StaticMatic
  module TemplateHandlers
    class Markdown < ActionView::TemplateHandler
      def render(template, local_assigns = {})
        ::BlueCloth::new(template.source).to_html
      end
    end
  end
end

ActionView::Template.register_template_handler(:markdown, StaticMatic::TemplateHandlers::Markdown)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tdreyno-staticmatic-2.0.3 lib/staticmatic/template_handlers/markdown.rb
tdreyno-staticmatic-2.1.0 lib/staticmatic/template_handlers/markdown.rb