History

python: include h2 entries for library docs

See #696.

Simon Legner committed 4 years ago

Commit 6e419991 parent ec4885d1 file · +2 −1Browse files

Unified · Split

lib/docs/filters/python/entries_v3.rb+2−1
@@ -57,7 +57,7 @@ module Docs · 56 unmodified lines
5757 end
5858
5959 def include_h2?
60− return slug.start_with?('reference') || slug.start_with?('tutorial') || slug.start_with?('using')
60+ return slug.start_with?('library') || slug.start_with?('reference') || slug.start_with?('tutorial') || slug.start_with?('using')
6161 end
6262
6363 def include_default_entry?
@@ -81,6 +81,7 @@ module Docs · 17 unmodified lines
8181 if include_h2?
8282 css('section[id] > h2').each do |node|
8383 name = node.content.remove("\u{00b6}")
84+ name.concat " (#{self.name})" if slug.start_with?('library')
8485 entries << [name, node.parent['id']]
8586 end
8687 end