Fix additional entries

pull/416/head
Matthias Guenther 9 years ago
parent c5ddc51d27
commit a84d1e15fd
No known key found for this signature in database
GPG Key ID: 5287E11BD64C14E5

@ -12,6 +12,24 @@ module Docs
type.remove! %r{#.+\z}
type.split('::')[0..2].join('::')
end
def additional_entries
return [] if root_page?
require 'cgi'
css('.summary_signature').inject [] do |entries, node|
name = node.children[1].attributes['title'].value
name = CGI.unescape(name)
unless name.start_with?('_')
name.prepend self.name
entries << [name, self.name.gsub('::','/').downcase.strip + node.children[1].attributes['href'].value.slice(/\#.*/)] unless entries.any? { |entry| entry[0] == name }
end
entries
end
end
end
end
end

Loading…
Cancel
Save