Fix: #3738; Move code wrapper from div to figure.
This commit is contained in:
parent
80f63949cd
commit
137efdc9f4
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 "Hello world"\n</code></pre></div>", @markdown.convert(
|
||||
assert_equal "<figure class=\"highlight\"><pre><code class=\"language-ruby\" data-lang=\"ruby\">puts "Hello world"\n</code></pre></figure>", @markdown.convert(
|
||||
<<-EOS
|
||||
```ruby
|
||||
puts "Hello world"
|
||||
|
|
Loading…
Reference in New Issue