RailsCasts Pro episodes are now free!

Learn more or hide this

Kevin Colyar's Profile

GitHub User: kevincolyar

Site: kevin.colyar.net

Comments by Kevin Colyar

Avatar

I fixed this by changing the sytnax_highlighter method to

ruby
  def syntax_highlight(html)
    doc = Nokogiri::HTML(html)
      doc.search("//pre[@lang]").each do |pre|
        pre.replace Albino.colorize(pre.text.rstrip, pre[:lang])
      end
    doc.css('body').inner_html.to_s
  end