lib/puppet-doc-lint/parser.rb in puppet-doc-lint-0.2.0 vs lib/puppet-doc-lint/parser.rb in puppet-doc-lint-0.3.0

- old
+ new

@@ -43,11 +43,11 @@ docs = {} rdoc.parts.each do |part| if part.respond_to?(:items) part.items.each do |item| - next if item.label.nil? + next if item.label.nil? || item.parts.first.class == RDoc::Markup::BlankLine key = item.label.to_s.tr('^A-Za-z0-9_-', '') docs[key] = item.parts.first.parts end # do item end # endif end # do parm @@ -61,10 +61,10 @@ authors = [] author_docs = rdoc.parts.chunk{|i|i.class == RDoc::Markup::Heading && i.text == 'Authors'}.reject{|sep,ans| sep}.map{|sep,ans| ans} author_docs.each do | doc_chunk | - unless doc_chunk[1].class == RDoc::Markup::BlankLine || doc_chunk[1].class == RDoc::Markup::Heading + unless doc_chunk[1].class == RDoc::Markup::BlankLine || doc_chunk[1].class == RDoc::Markup::Heading || !doc_chunk[1].respond_to?(:items) doc_chunk[1].items.each do |chunk| authors << chunk.parts.first.parts end end end