From 6e419996c57dd8ceeff1bb1ad8ddd28fb0e29af2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 2 Oct 2022 10:55:11 +0200 Subject: [PATCH] python: include h2 entries for library docs See #696. --- lib/docs/filters/python/entries_v3.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index 033427f4..fd3f5945 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -57,7 +57,7 @@ module Docs end def include_h2? - return slug.start_with?('reference') || slug.start_with?('tutorial') || slug.start_with?('using') + return slug.start_with?('library') || slug.start_with?('reference') || slug.start_with?('tutorial') || slug.start_with?('using') end def include_default_entry? @@ -81,6 +81,7 @@ module Docs if include_h2? css('section[id] > h2').each do |node| name = node.content.remove("\u{00b6}") + name.concat " (#{self.name})" if slug.start_with?('library') entries << [name, node.parent['id']] end end