Sha256: af39f96b23eff6e3de0ea3ba3752239dd11ae3fb30dab0c9c2601e43a258181f
Contents?: true
Size: 695 Bytes
Versions: 1
Compression:
Stored size: 695 Bytes
Contents
require 'kayessess/engine' require 'kayessess/styleguide' require 'to_slug' require 'redcarpet' require 'pygments' module Kayessess mattr_accessor :styleguide_location # 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kayessess-0.4.0 | lib/kayessess.rb |