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
44 def call
55 @doc = at_css('.page-inner > section')
66
7+ # Remove badges
8+ if root_page?
9+ css('a > img').each do |node|
10+ node.parent.remove
11+ end
12+ end
13+
714 # Clean headers
815 css('h1').each do |node|
916 node.content = node.content
1017 end
1118
1219 # Make headers on reference pages bigger
13− if subpath.include?('ReactWrapper') || subpath.include?('ShallowWrapper')
14− css('h4').each do |node|
20+ if subpath.include?('api/')
21+ css('h3, h4').each do |node|
1522 node.name = 'h2'
1623 end
1724 end
lib/docs/scrapers/enzyme.rb+1−1
@@ -10,7 +10,7 @@ module Docs · 9 unmodified lines
1010
1111 html_filters.push 'enzyme/entries', 'enzyme/clean_html'
1212
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)
1414
1515 options[:attribution] = <<-HTML
1616 &copy; 2015 Airbnb, Inc.<br>