aboutsummaryrefslogtreecommitdiff
path: root/plugins/code_block.rb
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2014-08-12 10:55:23 -0500
committerBrandon Mathis <brandon@imathis.com>2014-08-12 10:56:45 -0500
commit73e540409ceb8bc18048b6a96a4b815fc303ea28 (patch)
treeca3ae0e5cca03c7f0c8012a3ed4fbbf36b11ab9d /plugins/code_block.rb
parent18784a4cb04ed658268a5a4ba9bdf399e0c898ff (diff)
downloadmy_new_personal_website-73e540409ceb8bc18048b6a96a4b815fc303ea28.tar.xz
my_new_personal_website-73e540409ceb8bc18048b6a96a4b815fc303ea28.zip
Support octopress-hooks and octopress-date-format #1622
Diffstat (limited to 'plugins/code_block.rb')
-rw-r--r--plugins/code_block.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/code_block.rb b/plugins/code_block.rb
index 46620d86..539a3475 100644
--- a/plugins/code_block.rb
+++ b/plugins/code_block.rb
@@ -47,8 +47,6 @@ require './plugins/raw'
module Jekyll
class CodeBlock < Liquid::Block
- include HighlightCode
- include TemplateWrapper
CaptionUrlTitle = /(\S[\S\s]*)\s+(https?:\/\/\S+|\/\S+)\s*(.+)?/i
Caption = /(\S[\S\s]*)/
def initialize(tag_name, markup, tokens)
@@ -79,11 +77,11 @@ module Jekyll
source = "<figure class='code'>"
source += @caption if @caption
if @filetype
- source += "#{highlight(code, @filetype)}</figure>"
+ source += "#{HighlightCode::highlight(code, @filetype)}</figure>"
else
- source += "#{tableize_code(code.lstrip.rstrip.gsub(/</,'&lt;'))}</figure>"
+ source += "#{HighlightCode::tableize_code(code.lstrip.rstrip.gsub(/</,'&lt;'))}</figure>"
end
- source = safe_wrap(source)
+ source = TemplateWrapper::safe_wrap(source)
source = context['pygments_prefix'] + source if context['pygments_prefix']
source = source + context['pygments_suffix'] if context['pygments_suffix']
source