Browse code

Fixes styling of <figure> code header

Frederic Hemberger authored on 18/09/2011 at 19:27:42
Showing 2 changed files
... ...
@@ -24,7 +24,7 @@
24 24
 #
25 25
 # Output:
26 26
 #
27
-# <figure role=code>
27
+# <figure class='code'>
28 28
 # <figcaption><span>Got pain? painrelief.sh</span> <a href="http://site.com/painrelief.sh">Download it!</a>
29 29
 # <div class="highlight"><pre><code class="sh">
30 30
 # -- nicely escaped highlighted code --
... ...
@@ -37,7 +37,7 @@
37 37
 # <sarcasm>Ooooh, sarcasm... How original!</sarcasm>
38 38
 # {% endcodeblock %}
39 39
 #
40
-# <figure role=code>
40
+# <figure class='code'>
41 41
 # <pre><code>&lt;sarcasm> Ooooh, sarcasm... How original!&lt;/sarcasm></code></pre>
42 42
 # </figure>
43 43
 #
... ...
@@ -80,7 +80,7 @@ module Jekyll
80 80
     def render(context)
81 81
       output = super
82 82
       code = super.join
83
-      source = "<figure role=code>"
83
+      source = "<figure class='code'>"
84 84
       source += @caption if @caption
85 85
       if @filetype
86 86
         source += " #{highlight(code, @filetype)}</figure>"
... ...
@@ -61,7 +61,7 @@ module Jekyll
61 61
         @filetype = file.extname.sub('.','') if @filetype.nil?
62 62
         title = @title ? "#{@title} (#{file.basename})" : file.basename
63 63
         url = "/#{code_dir}/#{@file}"
64
-        source = "<figure role=code><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
64
+        source = "<figure class='code'><figcaption><span>#{title}</span> <a href='#{url}'>download</a></figcaption>\n"
65 65
         source += " #{highlight(code, @filetype)}</figure>"
66 66
         safe_wrap(source)
67 67
       end