diff --git a/lib/rocco.rb b/lib/rocco.rb
index 035f944..c278202 100644
--- a/lib/rocco.rb
+++ b/lib/rocco.rb
@@ -437,8 +437,7 @@ class Rocco
# dividers and run through the Markdown processor. Then split it back out
# into separate sections.
markdown = docs_blocks.join("\n\n##### DIVIDER\n\n")
- docs_html = Markdown.new(markdown, :smart).
- to_html.
+ docs_html = process_markdown(markdown).
split(/\n*
DIVIDER<\/h5>\n*/m)
# Combine all code blocks into a single big stream with section dividers and
@@ -492,6 +491,11 @@ class Rocco
docs_html.zip(code_html)
end
+ # Convert Markdown to classy HTML.
+ def process_markdown(text)
+ Markdown.new(text, :smart).to_html
+ end
+
# We `popen` a read/write pygmentize process in the parent and
# then fork off a child process to write the input.
def highlight_pygmentize(code)