rtomayko/rocco — pull request #105 by maxlinc (2014-05-22 00:34:41+00:00)
Title: Refactor: Extract code segmenting to it's own class

This is a possible answer for https://github.com/rtomayko/rocco/issues/104. Even if it's not the best solution, it should give you an idea of what I had in mind for #104.

This mostly moves the Rocco#parse method (and some related code) to a new class: Rocco::CodeSegmenter. This class does not do anything related to Markdown rendering, syntax highlighting, or writing HTML. So it would be easier to re-use this for other purposes, like the cases I described in #104.