Making `highlight` behave more like redcarpet
See issue 2510 for details.
This commit is contained in:
parent
11f9c22e56
commit
cc734930c6
|
@ -83,7 +83,7 @@ eos
|
|||
|
||||
def add_code_tag(code)
|
||||
# Add nested <code> tags to code blocks
|
||||
code = code.sub(/<pre>\n*/,'<pre><code class="' + @lang.to_s.gsub("+", "-") + '">')
|
||||
code = code.sub(/<pre>\n*/,'<pre><code class="language-' + @lang.to_s.gsub("+", "-") + '" data-lang="' + @lang.to_s + '">')
|
||||
code = code.sub(/\n*<\/pre>/,"</code></pre>")
|
||||
code.strip
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue