diff --git a/lib/rocco.rb b/lib/rocco.rb index 406363a..3563735 100644 --- a/lib/rocco.rb +++ b/lib/rocco.rb @@ -114,10 +114,10 @@ class Rocco # Combine all docs blocks into a single big markdown document and run # through RDiscount. Then split it back out into separate sections. - markdown = docs_blocks.join("\n##### DIVIDER\n") + markdown = docs_blocks.join("\n\n##### DIVIDER\n\n") docs_html = Markdown.new(markdown, :smart). to_html. - split("\n
` blocks. We'll add these back when we build to main
# document.
code_html = code_html.
- split(/\n?# DIVIDER<\/span>\n?/m).
+ split(/\n*# DIVIDER<\/span>\n*/m).
map { |code| code.sub(/\n?/m, '') }.
map { |code| code.sub(/\n?<\/pre><\/div>\n/m, '') }