History

Improve RDoc scraper

Thibaut committed 12 years ago

Commit f16eb371 parent d74678b3 files · +4 −4Browse files

Unified · Split

3 files
  1. lib/docs/filters/rdoc/clean_html.rb +1 −1
  2. lib/docs/filters/rdoc/container.rb +1 −1
  3. lib/docs/scrapers/rdoc/rdoc.rb +2 −2
lib/docs/filters/rdoc/clean_html.rb+1−1
@@ -7,7 +7,7 @@ module Docs · 6 unmodified lines
77 end
88
99 def root
10− at_css('h3').remove
10+ css('#methods + ul', 'h1', 'h2', 'li > ul').remove
1111
1212 # Remove skipped items
1313 css('li > span').each do |node|
lib/docs/filters/rdoc/container.rb+1−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
33 class ContainerFilter < Filter
44 def call
55 if root_page?
6− at_css '#classindex-section'
6+ at_css 'main'
77 else
88 container = at_css 'main'
99
lib/docs/scrapers/rdoc/rdoc.rb+2−2
@@ -2,12 +2,12 @@ module Docs · 1 unmodified line
22 class Rdoc < FileScraper
33 self.abstract = true
44 self.type = 'rdoc'
5− self.root_path = 'index.html'
5+ self.root_path = 'table_of_contents.html'
66
77 html_filters.replace 'container', 'rdoc/container'
88 html_filters.push 'rdoc/entries', 'rdoc/clean_html', 'title'
99
1010 options[:title] = false
11− options[:skip] = %w(table_of_contents.html)
11+ options[:skip] = %w(index.html)
1212 end
1313 end