From 31efb9d0f79cd9cc0e23ba45a8926a318dff177f Mon Sep 17 00:00:00 2001 From: Jasper van Merle Date: Sat, 6 Oct 2018 16:39:00 +0200 Subject: [PATCH] Fixed two Python 3.7 types --- lib/docs/filters/python/clean_html.rb | 6 ++++-- lib/docs/filters/python/entries_v3.rb | 22 ++++++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/docs/filters/python/clean_html.rb b/lib/docs/filters/python/clean_html.rb index db474da8..fef7948b 100644 --- a/lib/docs/filters/python/clean_html.rb +++ b/lib/docs/filters/python/clean_html.rb @@ -22,8 +22,10 @@ module Docs end end - css('h2', 'h3', 'h4').each do |node| - node.inner_html = node.inner_html.remove @levelRegexp + unless @levelRegexp.nil? + css('h2', 'h3', 'h4').each do |node| + node.inner_html = node.inner_html.remove @levelRegexp + end end end end diff --git a/lib/docs/filters/python/entries_v3.rb b/lib/docs/filters/python/entries_v3.rb index 759e244a..2bd06de2 100644 --- a/lib/docs/filters/python/entries_v3.rb +++ b/lib/docs/filters/python/entries_v3.rb @@ -2,16 +2,18 @@ module Docs class Python class EntriesV3Filter < Docs::EntriesFilter REPLACE_TYPES = { - 'Cryptographic' => 'Cryptography', - 'Custom Interpreters' => 'Interpreters', - 'Data Compression & Archiving' => 'Data Compression', - 'Generic Operating System' => 'Operating System', - 'Graphical User Interfaces with Tk' => 'Tk', - 'Internet Data Handling' => 'Internet Data', - 'Internet Protocols & Support' => 'Internet', - 'Interprocess Communication & Networking' => 'Networking', - 'Program Frameworks' => 'Frameworks', - 'Structured Markup Processing Tools' => 'Structured Markup' } + 'contextvars — Context Variables' => 'Context Variables', + 'Cryptographic' => 'Cryptography', + 'Custom Interpreters' => 'Interpreters', + 'Data Compression & Archiving' => 'Data Compression', + 'email — An email & MIME handling package' => 'Email', + 'Generic Operating System' => 'Operating System', + 'Graphical User Interfaces with Tk' => 'Tk', + 'Internet Data Handling' => 'Internet Data', + 'Internet Protocols & Support' => 'Internet', + 'Interprocess Communication & Networking' => 'Networking', + 'Program Frameworks' => 'Frameworks', + 'Structured Markup Processing Tools' => 'Structured Markup' } def get_name name = at_css('h1').content