Support octopress-hooks and octopress-date-format #1622

This commit is contained in:
Brandon Mathis 2014-08-12 10:55:23 -05:00
parent 18784a4cb0
commit 73e540409c
11 changed files with 47 additions and 58 deletions

View file

@ -27,8 +27,6 @@ require 'pathname'
module Jekyll
class IncludeCodeTag < Liquid::Tag
include HighlightCode
include TemplateWrapper
def initialize(tag_name, markup, tokens)
@title = nil
@file = nil
@ -62,8 +60,8 @@ module Jekyll
title = @title ? "#{@title} (#{file.basename})" : file.basename
url = "/#{code_dir}/#{@file}"
source = "<figure class='code'><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
source += "#{highlight(code, @filetype)}</figure>"
safe_wrap(source)
source += "#{HighlightCode::highlight(code, @filetype)}</figure>"
TemplateWrapper::safe_wrap(source)
end
end
end