Fixes styling of <figure> code header

This commit is contained in:
Frederic Hemberger 2011-09-18 21:27:42 +02:00
parent 31adeee1df
commit 44e4a991cf
2 changed files with 4 additions and 4 deletions

View File

@ -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 @@ module Jekyll
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>"

View File

@ -61,7 +61,7 @@ module Jekyll
@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