Sha256: a145d4e0d7be80ddb42653631a13ee600eb4fcd8450de4a36105a394c3d596a7
Contents?: true
Size: 656 Bytes
Versions: 19
Compression:
Stored size: 656 Bytes
Contents
require 'kayessess/engine' require 'kayessess/styleguide' require 'to_slug' require 'redcarpet' require 'pygments' module Kayessess # Helper class for adding Pygments syntax highlighting to Redcarpet class HTMLwithPygments < Redcarpet::Render::HTML def block_code(code, language) Pygments.highlight(code, :lexer => language) end end class << self def markdownerize(text) @redcarpet ||= Redcarpet::Markdown.new(Kayessess::HTMLwithPygments, :autolink => true, :fenced_code_blocks => true, :strikethrough => true, :footnotes => true) @redcarpet.render(text).html_safe end end end
Version data entries
19 entries across 19 versions & 1 rubygems