Skip to content

Commit 3bdd5e3

Browse files
committed
Update Redux documentation (4.1.2)
1 parent 8f01469 commit 3bdd5e3

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

assets/javascripts/templates/pages/about_tmpl.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ credits = [
728728
'https://creativecommons.org/licenses/by-sa/4.0/'
729729
], [
730730
'Redux',
731-
'2015-2020 Dan Abramov',
731+
'2015-2021 Dan Abramov',
732732
'MIT',
733733
'https://raw.githubusercontent.com/reactjs/redux/master/LICENSE.md'
734734
], [

lib/docs/filters/redux/clean_html.rb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,25 @@ class Redux
33
class CleanHtmlFilter < Filter
44
def call
55

6-
css('h1, h2, h3, h4').each do |node|
6+
css('h1, h2, h3, h4, h5').each do |node|
77
node.css('a').remove
8+
node.remove_attribute('class')
9+
node.parent.before(node.parent.children).remove if node.parent.name == 'header'
810
end
911

1012
css('h3').each do |node|
1113
node['id'] = node.content.gsub(/\(|\)/, '').downcase
1214
end
1315

14-
css('.codeBlockLines_b7E3').each do |node|
15-
node.remove_attribute('style')
16-
node.name = 'pre'
16+
css('pre').each do |node|
17+
node.content = node.css('.token-line').map(&:content).join("\n")
1718
node['data-language'] = 'javascript'
18-
19-
node.css('div, span').each do |subnode|
20-
subnode.remove_attribute('style')
21-
end
22-
2319
end
2420

25-
css('.copyButton_10dd').remove
21+
css('*').each do |node|
22+
node.remove_attribute('style')
23+
node.remove if node['class'] && node['class'].include?('copyButton')
24+
end
2625

2726
doc
2827

lib/docs/scrapers/redux.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class Redux < UrlScraper
1414
options[:container] = '.markdown'
1515

1616
options[:attribution] = <<-HTML
17-
&copy; 2015&ndash;2020 Dan Abramov<br>
17+
&copy; 2015&ndash;2021 Dan Abramov<br>
1818
Licensed under the MIT License.
1919
HTML
2020

2121
version do
22-
self.release = '4.0.5'
22+
self.release = '4.1.2'
2323
end
2424

2525
version '3' do

0 commit comments

Comments
 (0)