Permalink
Browse files

Merge pull request #50 from zpatten/master

Fix for crash when code is nil in lib/rocco/layout.rb, sections method.
  • Loading branch information...
2 parents 57be0b7 + 4c4ef24 commit a175735f0c4111506aa87e2dd95c46bcb7765995 @mikewest mikewest committed Jun 12, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/rocco/layout.rb
View
@@ -18,6 +18,7 @@ def title
def sections
num = 0
@doc.sections.map do |docs,code|
+ code ||= ''
is_header = /^<h.>(.+)<\/h.>$/.match( docs )
header_text = is_header && is_header[1].split.join("_")
num += 1

0 comments on commit a175735

Please sign in to comment.