Improving the syntax coloring
1 min read
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:
class HTML < Redcarpet::Render::HTML
include Rouge::Plugins::Redcarpet
def block_code(code, language)
Rouge.highlight(code, language || 'text', 'html')
end
endThen I swapped my pygments.sass file to pygments.scss and filled it with the theme from 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.