History

Update Redux documentation (4.1.2)

Simon Legner committed 4 years ago

Commit 3bdd5e31 parent 8f014693 files · +12 −13Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/redux/clean_html.rb +9 −10
  3. lib/docs/scrapers/redux.rb +2 −2
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -728,7 +728,7 @@ credits = [ · 727 unmodified lines
728 'https://creativecommons.org/licenses/by-sa/4.0/'728 'https://creativecommons.org/licenses/by-sa/4.0/'
729 ], [729 ], [
730 'Redux',730 'Redux',
731 '2015-2020 Dan Abramov',731 '2015-2021 Dan Abramov',
732 'MIT',732 'MIT',
733 'https://raw.githubusercontent.com/reactjs/redux/master/LICENSE.md'733 'https://raw.githubusercontent.com/reactjs/redux/master/LICENSE.md'
734 ], [734 ], [
lib/docs/filters/redux/clean_html.rb+9−10
@@ -3,26 +3,25 @@ module Docs · 2 unmodified lines
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 5
6 css('h1, h2, h3, h4').each do |node|6 css('h1, h2, h3, h4, h5').each do |node|
7 node.css('a').remove7 node.css('a').remove
8 node.remove_attribute('class')
9 node.parent.before(node.parent.children).remove if node.parent.name == 'header'
8 end10 end
9 11
10 css('h3').each do |node|12 css('h3').each do |node|
11 node['id'] = node.content.gsub(/\(|\)/, '').downcase13 node['id'] = node.content.gsub(/\(|\)/, '').downcase
12 end14 end
13 15
14 css('.codeBlockLines_b7E3').each do |node|16 css('pre').each do |node|
15 node.remove_attribute('style')17 node.content = node.css('.token-line').map(&:content).join("\n")
16 node.name = 'pre'
17 node['data-language'] = 'javascript'18 node['data-language'] = 'javascript'
18
19 node.css('div, span').each do |subnode|
20 subnode.remove_attribute('style')
21 end
22
23 end19 end
24 20
25 css('.copyButton_10dd').remove21 css('*').each do |node|
22 node.remove_attribute('style')
23 node.remove if node['class'] && node['class'].include?('copyButton')
24 end
26 25
27 doc26 doc
28 27
lib/docs/scrapers/redux.rb+2−2
@@ -14,12 +14,12 @@ module Docs · 13 unmodified lines
14 options[:container] = '.markdown'14 options[:container] = '.markdown'
15 15
16 options[:attribution] = <<-HTML16 options[:attribution] = <<-HTML
17 &copy; 2015&ndash;2020 Dan Abramov<br>17 &copy; 2015&ndash;2021 Dan Abramov<br>
18 Licensed under the MIT License.18 Licensed under the MIT License.
19 HTML19 HTML
20 20
21 version do21 version do
22 self.release = '4.0.5'22 self.release = '4.1.2'
23 end23 end
24 24
25 version '3' do25 version '3' do