[devdocsgjs/main: 875/1867] rust: re-add guide entries
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 875/1867] rust: re-add guide entries
- Date: Fri, 19 Nov 2021 23:47:33 +0000 (UTC)
commit c25865b3391a7178a3866fd93866d72ab647f948
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Thu Aug 22 22:03:12 2019 +0200
rust: re-add guide entries
lib/docs/filters/rust/entries.rb | 4 +++-
lib/docs/scrapers/rust.rb | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
---
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] = [/(?<!\.html)\z/, /\/print\.html/]
+ options[:skip] = %w(book/README.html book/ffi.html)
+ options[:skip_patterns] = [/(?<!\.html)\z/, /\/print\.html/, /\Abook\/second-edition\//]
options[:fix_urls] = ->(url) do
url.sub! %r{(#{Rust.base_url}.+/)\z}, '\1index.html'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]