Skip to content

Instantly share code, notes, and snippets.

@marcoceppi
Created July 2, 2012 16:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcoceppi/3033963 to your computer and use it in GitHub Desktop.
Save marcoceppi/3033963 to your computer and use it in GitHub Desktop.
Readme, wiki, and others choke when using code blocks.
--- a/lib/redcarpet/render/gitlab_html.rb
+++ b/lib/redcarpet/render/gitlab_html.rb
@@ -3,7 +3,7 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
if Pygments::Lexer.find(language)
Pygments.highlight(code, :lexer => language, :options => {:encoding => 'utf-8'})
else
- Pygments.highlight(code, :options => {:encoding => 'utf-8'})
+ Pygments.highlight(code, :lexer => 'bash', :options => {:encoding => 'utf-8'})
end
end
end
@derekbelrose
Copy link

This helped me out of a bind. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment