Fix: #3738; Move code wrapper from div to figure.

This commit is contained in:
Jordon Bedwell 2015-06-10 15:20:44 -05:00
parent 80f63949cd
commit 137efdc9f4
3 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ module Jekyll
include CommonMethods
def code_wrap(code)
"<div class=\"highlight\"><pre>#{CGI::escapeHTML(code)}</pre></div>"
"<figure class=\"highlight\"><pre>#{CGI::escapeHTML(code)}</pre></figure>"
end
def block_code(code, lang)

View File

@ -113,7 +113,7 @@ eos
"class=\"language-#{@lang.to_s.gsub('+', '-')}\"",
"data-lang=\"#{@lang.to_s}\""
].join(" ")
"<div class=\"highlight\"><pre><code #{code_attributes}>#{code.chomp}</code></pre></div>"
"<figure class=\"highlight\"><pre><code #{code_attributes}>#{code.chomp}</code></pre></figure>"
end
end

View File

@ -75,7 +75,7 @@ puts "Hello world"
end
should "render fenced code blocks without syntax highlighting" do
assert_equal "<div class=\"highlight\"><pre><code class=\"language-ruby\" data-lang=\"ruby\">puts &quot;Hello world&quot;\n</code></pre></div>", @markdown.convert(
assert_equal "<figure class=\"highlight\"><pre><code class=\"language-ruby\" data-lang=\"ruby\">puts &quot;Hello world&quot;\n</code></pre></figure>", @markdown.convert(
<<-EOS
```ruby
puts "Hello world"