[devdocsgjs/main: 48/239] Update Redux documentation (4.1.2)




commit 3bdd5e37ecb2a84501b6a56ce173d170808e4d59
Author: Simon Legner <Simon Legner gmail com>
Date:   Sun Dec 5 01:44:16 2021 +0100

    Update Redux documentation (4.1.2)

 assets/javascripts/templates/pages/about_tmpl.coffee |  2 +-
 lib/docs/filters/redux/clean_html.rb                 | 19 +++++++++----------
 lib/docs/scrapers/redux.rb                           |  4 ++--
 3 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee 
b/assets/javascripts/templates/pages/about_tmpl.coffee
index a0beb7b3..4ea79656 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -728,7 +728,7 @@ credits = [
     'https://creativecommons.org/licenses/by-sa/4.0/'
   ], [
     'Redux',
-    '2015-2020 Dan Abramov',
+    '2015-2021 Dan Abramov',
     'MIT',
     'https://raw.githubusercontent.com/reactjs/redux/master/LICENSE.md'
   ], [
diff --git a/lib/docs/filters/redux/clean_html.rb b/lib/docs/filters/redux/clean_html.rb
index a0aa9935..df12a319 100644
--- a/lib/docs/filters/redux/clean_html.rb
+++ b/lib/docs/filters/redux/clean_html.rb
@@ -3,26 +3,25 @@ module Docs
     class CleanHtmlFilter < Filter
       def call
 
-        css('h1, h2, h3, h4').each do |node|
+        css('h1, h2, h3, h4, h5').each do |node|
           node.css('a').remove
+          node.remove_attribute('class')
+          node.parent.before(node.parent.children).remove if node.parent.name == 'header'
         end
 
         css('h3').each do |node|
           node['id'] = node.content.gsub(/\(|\)/, '').downcase
         end
 
-        css('.codeBlockLines_b7E3').each do |node|
-          node.remove_attribute('style')
-          node.name = 'pre'
+        css('pre').each do |node|
+          node.content = node.css('.token-line').map(&:content).join("\n")
           node['data-language'] = 'javascript'
-
-          node.css('div, span').each do |subnode|
-            subnode.remove_attribute('style')
-          end
-
         end
 
-        css('.copyButton_10dd').remove
+        css('*').each do |node|
+          node.remove_attribute('style')
+          node.remove if node['class'] && node['class'].include?('copyButton')
+        end
 
         doc
 
diff --git a/lib/docs/scrapers/redux.rb b/lib/docs/scrapers/redux.rb
index 31a8de84..62482f8d 100644
--- a/lib/docs/scrapers/redux.rb
+++ b/lib/docs/scrapers/redux.rb
@@ -14,12 +14,12 @@ module Docs
     options[:container] = '.markdown'
 
     options[:attribution] = <<-HTML
-      &copy; 2015&ndash;2020 Dan Abramov<br>
+      &copy; 2015&ndash;2021 Dan Abramov<br>
       Licensed under the MIT License.
     HTML
 
     version do
-      self.release = '4.0.5'
+      self.release = '4.1.2'
     end
 
     version '3' do


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]