Merge branch 'use_redcarpet_for_markdown' of https://github.com/arthurschreiber/gitlabhq into arthurschreiber-use_redcarpet_for_markdown
Conflicts: Gemfile Gemfile.lock
This commit is contained in:
commit
9cb51c6ea2
7 changed files with 27 additions and 10 deletions
9
lib/redcarpet/render/gitlab_html.rb
Normal file
9
lib/redcarpet/render/gitlab_html.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
|
||||
def block_code(code, language)
|
||||
if Pygments::Lexer.find(language)
|
||||
Pygments.highlight(code, :lexer => language)
|
||||
else
|
||||
Pygments.highlight(code)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue