[#19] fix undefined method 'downcase' for nil:NilClass
This commit is contained in:
parent
1a9ff66f26
commit
d226bb70cf
|
@ -19,9 +19,10 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
|
||||||
#
|
#
|
||||||
# ruby code here
|
# ruby code here
|
||||||
#
|
#
|
||||||
|
code_class = "class=\"#{language.downcase}\"" if language.present?
|
||||||
<<-HTML
|
<<-HTML
|
||||||
|
|
||||||
<pre><code class="#{language.downcase}">#{code}</code></pre>
|
<pre><code #{code_class}">#{code}</code></pre>
|
||||||
|
|
||||||
HTML
|
HTML
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue