Permalink
Browse files

Fixes styling of <figure> code header

  • Loading branch information...
1 parent 31adeee commit 44e4a991cf7cab619edecc23bed667e4a3233560 @fhemberger fhemberger committed Sep 18, 2011
Showing with 4 additions and 4 deletions.
  1. +3 −3 plugins/code_block.rb
  2. +1 −1 plugins/include_code.rb
@@ -24,7 +24,7 @@
#
# Output:
#
-# <figure role=code>
+# <figure class='code'>
# <figcaption><span>Got pain? painrelief.sh</span> <a href="http://site.com/painrelief.sh">Download it!</a>
# <div class="highlight"><pre><code class="sh">
# -- nicely escaped highlighted code --
@@ -37,7 +37,7 @@
# <sarcasm>Ooooh, sarcasm... How original!</sarcasm>
# {% endcodeblock %}
#
-# <figure role=code>
+# <figure class='code'>
# <pre><code>&lt;sarcasm> Ooooh, sarcasm... How original!&lt;/sarcasm></code></pre>
# </figure>
#
@@ -80,7 +80,7 @@ def initialize(tag_name, markup, tokens)
def render(context)
output = super
code = super.join
- source = "<figure role=code>"
+ source = "<figure class='code'>"
source += @caption if @caption
if @filetype
source += " #{highlight(code, @filetype)}</figure>"
@@ -61,7 +61,7 @@ def render(context)
@filetype = file.extname.sub('.','') if @filetype.nil?
title = @title ? "#{@title} (#{file.basename})" : file.basename
url = "/#{code_dir}/#{@file}"
- source = "<figure role=code><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
+ source = "<figure class='code'><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
source += " #{highlight(code, @filetype)}</figure>"
safe_wrap(source)
end

0 comments on commit 44e4a99

Please sign in to comment.