Sha256: 24a09d4ea49d84390304812f9cbfee497da2e4405846c00eac02ec8798b95cd0
Contents?: true
Size: 872 Bytes
Versions: 4
Compression:
Stored size: 872 Bytes
Contents
module Middleman::Renderers::Markdown class << self def registered(app) require "redcarpet" # Forcably disable Redcarpet1 support. # Tilt defaults to this if available, but the compat # layer disables extensions. Object.send(:remove_const, :RedcarpetCompat) if defined? ::RedcarpetCompat app.set :markdown_engine, :redcarpet app.set :markdown_engine_prefix, ::Tilt app.after_configuration do unless markdown_engine.nil? if markdown_engine.is_a? Symbol engine = engine.to_s engine = engine == "rdiscount" ? "RDiscount" : engine.camelize markdown_engine = markdown_engine_prefix.const_get("#{engine}Template") end ::Tilt.prefer(markdown_engine) end end end alias :included :registered end end
Version data entries
4 entries across 4 versions & 2 rubygems