|
|
@ -27,7 +27,7 @@ module BacktickCodeBlock
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if @lang.nil? || @lang == 'plain'
|
|
|
|
if @lang.nil? || @lang == 'plain'
|
|
|
|
code = tableize_code(str.gsub('<','<').gsub('>','>'))
|
|
|
|
code = tableize_code(str.gsub('<','<').gsub('>','>'))
|
|
|
|
"<figure role=code>#{@caption}#{code}</figure>"
|
|
|
|
"<figure class='code'>#{@caption}#{code}</figure>"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if @lang.include? "-raw"
|
|
|
|
if @lang.include? "-raw"
|
|
|
|
raw = "``` #{@options.sub('-raw', '')}\n"
|
|
|
|
raw = "``` #{@options.sub('-raw', '')}\n"
|
|
|
@ -35,7 +35,7 @@ module BacktickCodeBlock
|
|
|
|
raw += "\n```\n"
|
|
|
|
raw += "\n```\n"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
code = highlight(str, @lang)
|
|
|
|
code = highlight(str, @lang)
|
|
|
|
"<figure role=code>#{@caption}#{code}</figure>"
|
|
|
|
"<figure class='code'>#{@caption}#{code}</figure>"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|