aboutsummaryrefslogtreecommitdiff
path: root/plugins/backtick_code_block.rb
diff options
context:
space:
mode:
authorFrederic Hemberger <mail@frederic-hemberger.de>2011-09-18 13:55:35 +0200
committerFrederic Hemberger <mail@frederic-hemberger.de>2011-09-18 13:55:35 +0200
commit347e855ddc05c4da2f0530db436a9097d8ddbaea (patch)
treed86b0c1bc56ec36a0ebb8bc263da1101d66739f0 /plugins/backtick_code_block.rb
parent9e5e3c5d2f52b4e67d599717ab4bacc7b6fb73a6 (diff)
downloadmy_new_personal_website-347e855ddc05c4da2f0530db436a9097d8ddbaea.tar.xz
my_new_personal_website-347e855ddc05c4da2f0530db436a9097d8ddbaea.zip
Fixes HTML validation issues with code highlighting
Diffstat (limited to 'plugins/backtick_code_block.rb')
-rw-r--r--plugins/backtick_code_block.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/backtick_code_block.rb b/plugins/backtick_code_block.rb
index 7f5076df..6243de6f 100644
--- a/plugins/backtick_code_block.rb
+++ b/plugins/backtick_code_block.rb
@@ -27,7 +27,7 @@ module BacktickCodeBlock
end
if @lang.nil? || @lang == 'plain'
code = tableize_code(str.gsub('<','&lt;').gsub('>','&gt;'))
- "<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