Making `highlight` behave more like redcarpet

See issue 2510 for details.
This commit is contained in:
Denilson Figueiredo de Sá 2014-06-13 03:31:38 -03:00
parent 11f9c22e56
commit cc734930c6
1 changed files with 1 additions and 1 deletions

View File

@ -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