| @@ -22,16 +22,16 @@ module Docs · 21 unmodified lines |
| 22 | | 22 | |
| 23 | def additional_entries | 23 | def additional_entries |
| 24 | if slug.start_with?('configuration') | 24 | if slug.start_with?('configuration') |
| 25 | css('h2[id] code').each_with_object [] do |node, entries| | 25 | css('h2[id]').each_with_object [] do |node, entries| |
| 26 | next if node.previous.try(:content).present? | 26 | next if version.to_f < 5 && node.previous.try(:content).present? |
| 27 | entries << [node.content, node.parent['id']] | 27 | entries << [node.content, node['id']] |
| 28 | end | 28 | end |
| 29 | elsif slug.start_with?('api') && slug != 'api/parser' | 29 | elsif slug.start_with?('api') && slug != 'api/parser' |
| 30 | css('.header[id] code').each_with_object [] do |node, entries| | 30 | css('.header[id] code').each_with_object [] do |node, entries| |
| 31 | next if node.previous.try(:content).present? || node.next.try(:content).present? | 31 | next if version.to_f < 5 && (node.previous.try(:content).present? || node.next.try(:content).present?) |
| 32 | name = node.content.sub(/\(.*\)/, '()') | 32 | name = node.content.sub(/\(.*\)/, '()') |
| 33 | name.prepend "#{self.name.split(':').first}: " | 33 | name.prepend "#{self.name.split(':').first}: " |
| 34 | entries << [name, node.parent['id']] | 34 | entries << [name, node['id']] |
| 35 | end | 35 | end |
| 36 | else | 36 | else |
| 37 | [] | 37 | [] |