Showing the changes to lib/docs/filters/python (2 of 2 files). Show all
Unified · Split
| @@ -22,8 +22,10 @@ module Docs · 21 unmodified lines | |||
| 22 | end | 22 | end |
| 23 | end | 23 | end |
| 24 | 24 | ||
| 25 | css('h2', 'h3', 'h4').each do |node| | 25 | unless @levelRegexp.nil? |
| 26 | node.inner_html = node.inner_html.remove @levelRegexp | 26 | css('h2', 'h3', 'h4').each do |node| |
| 27 | node.inner_html = node.inner_html.remove @levelRegexp | ||
| 28 | end | ||
| 27 | end | 29 | end |
| 28 | end | 30 | end |
| 29 | end | 31 | end |
| @@ -2,16 +2,18 @@ module Docs · 1 unmodified line | |||
| 2 | class Python | 2 | class Python |
| 3 | class EntriesV3Filter < Docs::EntriesFilter | 3 | class EntriesV3Filter < Docs::EntriesFilter |
| 4 | REPLACE_TYPES = { | 4 | REPLACE_TYPES = { |
| 5 | 'Cryptographic' => 'Cryptography', | 5 | 'contextvars — Context Variables' => 'Context Variables', |
| 6 | 'Custom Interpreters' => 'Interpreters', | 6 | 'Cryptographic' => 'Cryptography', |
| 7 | 'Data Compression & Archiving' => 'Data Compression', | 7 | 'Custom Interpreters' => 'Interpreters', |
| 8 | 'Generic Operating System' => 'Operating System', | 8 | 'Data Compression & Archiving' => 'Data Compression', |
| 9 | 'Graphical User Interfaces with Tk' => 'Tk', | 9 | 'email — An email & MIME handling package' => 'Email', |
| 10 | 'Internet Data Handling' => 'Internet Data', | 10 | 'Generic Operating System' => 'Operating System', |
| 11 | 'Internet Protocols & Support' => 'Internet', | 11 | 'Graphical User Interfaces with Tk' => 'Tk', |
| 12 | 'Interprocess Communication & Networking' => 'Networking', | 12 | 'Internet Data Handling' => 'Internet Data', |
| 13 | 'Program Frameworks' => 'Frameworks', | 13 | 'Internet Protocols & Support' => 'Internet', |
| 14 | 'Structured Markup Processing Tools' => 'Structured Markup' } | 14 | 'Interprocess Communication & Networking' => 'Networking', |
| 15 | 'Program Frameworks' => 'Frameworks', | ||
| 16 | 'Structured Markup Processing Tools' => 'Structured Markup' } | ||
| 15 | 17 | ||
| 16 | def get_name | 18 | def get_name |
| 17 | name = at_css('h1').content | 19 | name = at_css('h1').content |