|
|
|
@ -22,16 +22,16 @@ module Docs
|
|
|
|
|
|
|
|
|
|
def additional_entries
|
|
|
|
|
if slug.start_with?('configuration')
|
|
|
|
|
css('h2[id] code').each_with_object [] do |node, entries|
|
|
|
|
|
next if node.previous.try(:content).present?
|
|
|
|
|
entries << [node.content, node.parent['id']]
|
|
|
|
|
css('h2[id]').each_with_object [] do |node, entries|
|
|
|
|
|
next if version.to_f < 5 && node.previous.try(:content).present?
|
|
|
|
|
entries << [node.content, node['id']]
|
|
|
|
|
end
|
|
|
|
|
elsif slug.start_with?('api') && slug != 'api/parser'
|
|
|
|
|
css('.header[id] code').each_with_object [] do |node, entries|
|
|
|
|
|
next if node.previous.try(:content).present? || node.next.try(:content).present?
|
|
|
|
|
next if version.to_f < 5 && (node.previous.try(:content).present? || node.next.try(:content).present?)
|
|
|
|
|
name = node.content.sub(/\(.*\)/, '()')
|
|
|
|
|
name.prepend "#{self.name.split(':').first}: "
|
|
|
|
|
entries << [name, node.parent['id']]
|
|
|
|
|
entries << [name, node['id']]
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
[]
|
|
|
|
|