Update Redux documentation (4.1.2)

pull/1670/head
Simon Legner 3 years ago
parent 8f01469182
commit 3bdd5e37ec

@ -728,7 +728,7 @@ credits = [
'https://creativecommons.org/licenses/by-sa/4.0/' 'https://creativecommons.org/licenses/by-sa/4.0/'
], [ ], [
'Redux', 'Redux',
'2015-2020 Dan Abramov', '2015-2021 Dan Abramov',
'MIT', 'MIT',
'https://raw.githubusercontent.com/reactjs/redux/master/LICENSE.md' 'https://raw.githubusercontent.com/reactjs/redux/master/LICENSE.md'
], [ ], [

@ -3,26 +3,25 @@ module Docs
class CleanHtmlFilter < Filter class CleanHtmlFilter < Filter
def call def call
css('h1, h2, h3, h4').each do |node| css('h1, h2, h3, h4, h5').each do |node|
node.css('a').remove node.css('a').remove
node.remove_attribute('class')
node.parent.before(node.parent.children).remove if node.parent.name == 'header'
end end
css('h3').each do |node| css('h3').each do |node|
node['id'] = node.content.gsub(/\(|\)/, '').downcase node['id'] = node.content.gsub(/\(|\)/, '').downcase
end end
css('.codeBlockLines_b7E3').each do |node| css('pre').each do |node|
node.remove_attribute('style') node.content = node.css('.token-line').map(&:content).join("\n")
node.name = 'pre'
node['data-language'] = 'javascript' node['data-language'] = 'javascript'
node.css('div, span').each do |subnode|
subnode.remove_attribute('style')
end
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 doc

@ -14,12 +14,12 @@ module Docs
options[:container] = '.markdown' options[:container] = '.markdown'
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2015&ndash;2020 Dan Abramov<br> &copy; 2015&ndash;2021 Dan Abramov<br>
Licensed under the MIT License. Licensed under the MIT License.
HTML HTML
version do version do
self.release = '4.0.5' self.release = '4.1.2'
end end
version '3' do version '3' do

Loading…
Cancel
Save