History

python: add glossary entries

Simon Legner committed 4 years ago

Commit 1de7a611 parent 12136291 file · +5 −0Browse files

Showing the changes to lib/docs/filters/python (1 of 1 file). Show all

Unified · Split

lib/docs/filters/python/entries_v3.rb+5−0
@@ -31,6 +31,7 @@ module Docs · 30 unmodified lines
3131 return 'Tutorial' if slug.start_with? 'tutorial'
3232 return 'Software Packaging & Distribution' if slug.start_with? 'distributing'
3333 return 'Software Packaging & Distribution' if slug.start_with? 'distutils'
34+ return 'Glossary' if slug.start_with? 'glossary'
3435
3536 return 'Basics' unless slug.start_with? 'library/'
3637 return 'Basics' if slug.start_with? 'library/index'
@@ -76,6 +77,10 @@ module Docs · 39 unmodified lines
7677 entries << [node['id'], node['id']]
7778 end
7879
80+ css('.glossary > dt[id]').each do |node|
81+ entries << [node.content, node['id']]
82+ end
83+
7984 css('.function > dt[id]', '.method > dt[id]', '.staticmethod > dt[id]', '.classmethod > dt[id]').each do |node|
8085 entries << [node['id'] + '()', node['id']]
8186 end