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