Merge pull request #50 from zpatten/master

Fix for crash when code is nil in lib/rocco/layout.rb, sections method.
This commit is contained in:
Mike West 2011-06-12 05:27:36 -07:00
commit a175735f0c

View File

@ -18,6 +18,7 @@ class Rocco::Layout < Mustache
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