History

enzyme: process review comments

Jasper van Merle committed 7 years ago

Commit af412d61 parent abe3d4b2 files · +10 −3Browse files

Unified · Split

2 files
  1. lib/docs/filters/enzyme/clean_html.rb +9 −2
  2. lib/docs/scrapers/enzyme.rb +1 −1
lib/docs/filters/enzyme/clean_html.rb+9−2
@@ -4,14 +4,21 @@ module Docs · 3 unmodified lines
4 def call4 def call
5 @doc = at_css('.page-inner > section')5 @doc = at_css('.page-inner > section')
6 6
7 # Remove badges
8 if root_page?
9 css('a > img').each do |node|
10 node.parent.remove
11 end
12 end
13
7 # Clean headers14 # Clean headers
8 css('h1').each do |node|15 css('h1').each do |node|
9 node.content = node.content16 node.content = node.content
10 end17 end
11 18
12 # Make headers on reference pages bigger19 # Make headers on reference pages bigger
13 if subpath.include?('ReactWrapper') || subpath.include?('ShallowWrapper')20 if subpath.include?('api/')
14 css('h4').each do |node|21 css('h3, h4').each do |node|
15 node.name = 'h2'22 node.name = 'h2'
16 end23 end
17 end24 end
lib/docs/scrapers/enzyme.rb+1−1
@@ -10,7 +10,7 @@ module Docs · 9 unmodified lines
10 10
11 html_filters.push 'enzyme/entries', 'enzyme/clean_html'11 html_filters.push 'enzyme/entries', 'enzyme/clean_html'
12 12
13 options[:skip] = %w(CHANGELOG.html docs/future.html CONTRIBUTING.html)13 options[:skip] = %w(CHANGELOG.html docs/future.html docs/guides.html docs/api/ CONTRIBUTING.html)
14 14
15 options[:attribution] = <<-HTML15 options[:attribution] = <<-HTML
16 &copy; 2015 Airbnb, Inc.<br>16 &copy; 2015 Airbnb, Inc.<br>