---
title: "Improving the syntax coloring"
slug: improving-the-syntax-coloring
section: tech
date: 2015-06-03T17:15:00.000Z
canonical: https://roland.leth.ro/blog/tech/improving-the-syntax-coloring
---

Until now I used `pygments` gem. I'm pretty sure it would have been just as good to keep using it, but I switched to `rouge`:

```ruby
class HTML < Redcarpet::Render::HTML
  include Rouge::Plugins::Redcarpet
  
  def block_code(code, language)
    Rouge.highlight(code, language || 'text', 'html')
  end
end
```

Then I swapped my `pygments.sass` file to `pygments.scss` and filled it with the theme from [http://rouge.jneen.net](http://rouge.jneen.net), since I quite like it, and that was it. I'm pretty sure I will tweak the theme in the near future, but I'm happy for now.

There's also this little helper `rougify style monokai.sublime > syntax.css`.
