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.
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.