jneen/rouge.jneen.net — pull request #5 by edwardloveall (2014-12-29 01:01:39+00:00)
Title: Highlighter

This builds off of the [last PR](https://github.com/jneen/rouge.jneen.net/pull/4) which should be taken care of before this one.

This adds a service class called Highlighter. Highlighter is passed params like `language`, `source`, and `format` and returns highlighted html. It also raises appropriate errors and takes care of a newline input problem, all while keeping a simple interface to the controller.

The errors that it returns get caught by the `ApplicationController` and their messages are displayed in the code output box to give the user more info if they get into a bad state.