Sha256: 7657fcbbb14665057f10241b41a7c90e997f12b2003f9b0ea65150d5c6c47137
Contents?: true
Size: 454 Bytes
Versions: 4
Compression:
Stored size: 454 Bytes
Contents
module Jekyll class Highlight < Liquid::Block include Liquid::StandardFilters def initialize(tag_name, lang, tokens) super @lang = lang.strip end def render(context) #The div is required because RDiscount blows ass <<-HTML <div> <pre> <code class='#{@lang}'>#{h(super.to_s).strip}</code> </pre> </div> HTML end end end Liquid::Template.register_tag('highlight', Jekyll::Highlight)
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
mojombo-jekyll-0.1.3 | lib/jekyll/blocks.rb |
mojombo-jekyll-0.1.4 | lib/jekyll/blocks.rb |
jekyll-0.1.3 | lib/jekyll/blocks.rb |
jekyll-0.1.4 | lib/jekyll/blocks.rb |