Improve RDoc scraper

pull/69/head
Thibaut 11 years ago
parent d74678b4eb
commit f16eb371bf

@ -7,7 +7,7 @@ module Docs
end
def root
at_css('h3').remove
css('#methods + ul', 'h1', 'h2', 'li > ul').remove
# Remove skipped items
css('li > span').each do |node|

@ -3,7 +3,7 @@ module Docs
class ContainerFilter < Filter
def call
if root_page?
at_css '#classindex-section'
at_css 'main'
else
container = at_css 'main'

@ -2,12 +2,12 @@ module Docs
class Rdoc < FileScraper
self.abstract = true
self.type = 'rdoc'
self.root_path = 'index.html'
self.root_path = 'table_of_contents.html'
html_filters.replace 'container', 'rdoc/container'
html_filters.push 'rdoc/entries', 'rdoc/clean_html', 'title'
options[:title] = false
options[:skip] = %w(table_of_contents.html)
options[:skip] = %w(index.html)
end
end

Loading…
Cancel
Save