diff options
Diffstat (limited to 'plugins/backtick_code_block.rb')
-rw-r--r-- | plugins/backtick_code_block.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/backtick_code_block.rb b/plugins/backtick_code_block.rb index 8e2c1141..ae4a0472 100644 --- a/plugins/backtick_code_block.rb +++ b/plugins/backtick_code_block.rb @@ -1,10 +1,9 @@ require './plugins/pygments_code' module BacktickCodeBlock - include HighlightCode AllOptions = /([^\s]+)\s+(.+?)\s+(https?:\/\/\S+|\/\S+)\s*(.+)?/i LangCaption = /([^\s]+)\s*(.+)?/i - def render_code_block(input) + def self.render_code_block(input) @options = nil @caption = nil @lang = nil @@ -26,7 +25,7 @@ module BacktickCodeBlock str = str.gsub(/^( {4}|\t)/, '') end if @lang.nil? || @lang == 'plain' - code = tableize_code(str.gsub('<','<').gsub('>','>')) + code = HighlightCode::tableize_code(str.gsub('<','<').gsub('>','>')) "<figure class='code'>#{@caption}#{code}</figure>" else if @lang.include? "-raw" @@ -34,7 +33,7 @@ module BacktickCodeBlock raw += str raw += "\n```\n" else - code = highlight(str, @lang) + code = HighlightCode::highlight(str, @lang) "<figure class='code'>#{@caption}#{code}</figure>" end end |