Fixed wierd gitlab markdown issue
This commit is contained in:
parent
cec866a7ce
commit
2398af9ab0
2 changed files with 12 additions and 5 deletions
|
@ -13,10 +13,17 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
|
|||
options = { options: {encoding: 'utf-8'} }
|
||||
options.merge!(lexer: language.downcase) if Pygments::Lexer.find(language)
|
||||
|
||||
# New lines are placed to fix an rendering issue
|
||||
# with code wrapped inside <h1> tag for next case:
|
||||
#
|
||||
# # Title kinda h1
|
||||
#
|
||||
# ruby code here
|
||||
#
|
||||
<<-HTML
|
||||
<div class="#{h.user_color_scheme_class}">
|
||||
#{Pygments.highlight(code, options)}
|
||||
</div>
|
||||
|
||||
<div class="#{h.user_color_scheme_class}">#{Pygments.highlight(code, options)}</div>
|
||||
|
||||
HTML
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue