diff --git a/lib/docs/filters/rust/entries.rb b/lib/docs/filters/rust/entries.rb index 03d08783..524342fc 100644 --- a/lib/docs/filters/rust/entries.rb +++ b/lib/docs/filters/rust/entries.rb @@ -17,7 +17,9 @@ module Docs PRIMITIVE_SLUG = /\A(\w+)\/(primitive)\./ def get_type - if slug.start_with?('reference') + if slug.start_with?('book') + 'Guide' + elsif slug.start_with?('reference') 'Reference' elsif slug == 'error-index' 'Compiler Errors' diff --git a/lib/docs/scrapers/rust.rb b/lib/docs/scrapers/rust.rb index aa443450..f6459fe4 100644 --- a/lib/docs/scrapers/rust.rb +++ b/lib/docs/scrapers/rust.rb @@ -19,12 +19,13 @@ module Docs html_filters.push 'rust/entries', 'rust/clean_html' options[:only_patterns] = [ + /\Abook\//, /\Areference\//, /\Acollections\//, /\Astd\// ] - options[:skip] = %w(book/README.html) - options[:skip_patterns] = [/(?(url) do url.sub! %r{(#{Rust.base_url}.+/)\z}, '\1index.html'