Fixes HTML validation issues with code highlighting
This commit is contained in:
parent
9e5e3c5d2f
commit
347e855ddc
3 changed files with 7 additions and 7 deletions
|
@ -27,7 +27,7 @@ module BacktickCodeBlock
|
|||
end
|
||||
if @lang.nil? || @lang == 'plain'
|
||||
code = tableize_code(str.gsub('<','<').gsub('>','>'))
|
||||
"<figure role=code>#{@caption}#{code}</figure>"
|
||||
"<figure class='code'>#{@caption}#{code}</figure>"
|
||||
else
|
||||
if @lang.include? "-raw"
|
||||
raw = "``` #{@options.sub('-raw', '')}\n"
|
||||
|
@ -35,7 +35,7 @@ module BacktickCodeBlock
|
|||
raw += "\n```\n"
|
||||
else
|
||||
code = highlight(str, @lang)
|
||||
"<figure role=code>#{@caption}#{code}</figure>"
|
||||
"<figure class='code'>#{@caption}#{code}</figure>"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue