Sha256: 642c683a22141d839ead256fd6e4531bbc0aca5a57cc6239d3dfa2893db53486
Contents?: true
Size: 701 Bytes
Versions: 7
Compression:
Stored size: 701 Bytes
Contents
require 'cgi' require 'redcarpet' module RevealCK module Markdown # This class defines what "Slide Markdown" is. class SlideMarkdown < Redcarpet::Render::HTML def preprocess(doc) PreProcessor.new(doc).process end def postprocess(doc) PostProcessor.new(doc).process end def block_code(code, language) escaped = CGI.escape_html(code) if language.nil? "<pre><code>#{escaped}</code></pre>" elsif language == 'notes' || language == 'note' "<aside class='notes'>#{escaped}</aside>" else "<pre><code class=\"#{language}\">#{escaped}</code></pre>" end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems