Skip to content

Commit 44e4a99

Browse files
committed
Fixes styling of <figure> code header
1 parent 31adeee commit 44e4a99

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

plugins/code_block.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#
2525
# Output:
2626
#
27-
# <figure role=code>
27+
# <figure class='code'>
2828
# <figcaption><span>Got pain? painrelief.sh</span> <a href="http://site.com/painrelief.sh">Download it!</a>
2929
# <div class="highlight"><pre><code class="sh">
3030
# -- nicely escaped highlighted code --
@@ -37,7 +37,7 @@
3737
# <sarcasm>Ooooh, sarcasm... How original!</sarcasm>
3838
# {% endcodeblock %}
3939
#
40-
# <figure role=code>
40+
# <figure class='code'>
4141
# <pre><code>&lt;sarcasm> Ooooh, sarcasm... How original!&lt;/sarcasm></code></pre>
4242
# </figure>
4343
#
@@ -80,7 +80,7 @@ def initialize(tag_name, markup, tokens)
8080
def render(context)
8181
output = super
8282
code = super.join
83-
source = "<figure role=code>"
83+
source = "<figure class='code'>"
8484
source += @caption if @caption
8585
if @filetype
8686
source += " #{highlight(code, @filetype)}</figure>"

plugins/include_code.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def render(context)
6161
@filetype = file.extname.sub('.','') if @filetype.nil?
6262
title = @title ? "#{@title} (#{file.basename})" : file.basename
6363
url = "/#{code_dir}/#{@file}"
64-
source = "<figure role=code><figcaption><span>#{title}</span> <a href="proxy.php?url=https%3A%2F%2Fwww.github.com%2F%3Cspan+class%3D"pl-s1">#{url}'>download</a></figcaption>\n"
64+
source = "<figure class='code'><figcaption><span>#{title}</span> <a href="proxy.php?url=https%3A%2F%2Fwww.github.com%2F%3Cspan+class%3D"pl-s1">#{url}'>download</a></figcaption>\n"
6565
source += " #{highlight(code, @filetype)}</figure>"
6666
safe_wrap(source)
6767
end

0 commit comments

Comments
 (0)