diff options
author | Arthur Schreiber <schreiber.arthur@gmail.com> | 2012-04-17 23:02:21 +0200 |
---|---|---|
committer | Arthur Schreiber <schreiber.arthur@gmail.com> | 2012-04-20 23:01:45 +0200 |
commit | c437e2d7d416dae73efdea248a34b452d912986e (patch) | |
tree | ce9755df8f492daea82197db0d984d331d725ad7 /lib/redcarpet | |
parent | 9ee345750ca43f4e4b0c429ebc913caba9684dcf (diff) | |
download | gitlab-ce-c437e2d7d416dae73efdea248a34b452d912986e.tar.gz |
Switch to Redcarpet for Markdown Rendering.
This gives us Github Flavored Markdown, which is awesome.
Diffstat (limited to 'lib/redcarpet')
-rw-r--r-- | lib/redcarpet/render/gitlab_html.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/redcarpet/render/gitlab_html.rb b/lib/redcarpet/render/gitlab_html.rb new file mode 100644 index 00000000000..29be478052a --- /dev/null +++ b/lib/redcarpet/render/gitlab_html.rb @@ -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
\ No newline at end of file |