From 7ff958a491a38bfec987fae9f9bb2690c2bd5877 Mon Sep 17 00:00:00 2001 From: Virtual256 Date: Fri, 26 Jul 2024 16:35:02 -0700 Subject: [PATCH 1/2] fix rust 1.79.0 docs std crate indexing --- lib/docs/filters/rust/clean_html.rb | 1 + lib/docs/filters/rust/entries.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/docs/filters/rust/clean_html.rb b/lib/docs/filters/rust/clean_html.rb index f42b714a..1b725a24 100644 --- a/lib/docs/filters/rust/clean_html.rb +++ b/lib/docs/filters/rust/clean_html.rb @@ -19,6 +19,7 @@ module Docs css('.anchor').remove css('.main-heading > h1').each do |node| + node.at('button')&.remove node.parent.name = 'h1' node.parent.content = node.content end diff --git a/lib/docs/filters/rust/entries.rb b/lib/docs/filters/rust/entries.rb index cadb6786..db795cb7 100644 --- a/lib/docs/filters/rust/entries.rb +++ b/lib/docs/filters/rust/entries.rb @@ -9,6 +9,7 @@ module Docs elsif slug == 'error-index' 'Compiler Errors' else + at_css('main h1').at_css('button')&.remove name = at_css('main h1').content.remove(/\A.+\s/).remove('⎘') mod = slug.split('/').first name.prepend("#{mod}::") unless name.start_with?(mod) From febe65d6ab9712195534d135868db68990dfff52 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 28 Jul 2024 09:57:31 +0200 Subject: [PATCH 2/2] Update Rust documentation (1.80.0) --- assets/stylesheets/pages/_rust.scss | 2 +- lib/docs/filters/rust/clean_html.rb | 2 ++ lib/docs/scrapers/rust.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/stylesheets/pages/_rust.scss b/assets/stylesheets/pages/_rust.scss index f36df8d6..d1a181d9 100644 --- a/assets/stylesheets/pages/_rust.scss +++ b/assets/stylesheets/pages/_rust.scss @@ -14,7 +14,7 @@ em.stab, span.stab { @extend %label; } em.stab.unstable, span.stab.unstable { @extend %label-orange; } .out-of-band { float: right; } - .since, .srclink { + .since, .src, .rightside { float: right; margin-left: .5rem; } diff --git a/lib/docs/filters/rust/clean_html.rb b/lib/docs/filters/rust/clean_html.rb index 1b725a24..d2049956 100644 --- a/lib/docs/filters/rust/clean_html.rb +++ b/lib/docs/filters/rust/clean_html.rb @@ -30,6 +30,8 @@ module Docs end end + css('.doc-anchor').remove + # Fix notable trait sections css('.method, .rust.trait').each do |node| traitSection = node.at_css('.notable-traits') diff --git a/lib/docs/scrapers/rust.rb b/lib/docs/scrapers/rust.rb index e7d87ce0..7f869858 100644 --- a/lib/docs/scrapers/rust.rb +++ b/lib/docs/scrapers/rust.rb @@ -3,7 +3,7 @@ module Docs class Rust < UrlScraper self.type = 'rust' - self.release = '1.79.0' + self.release = '1.80.0' self.base_url = 'https://doc.rust-lang.org/' self.root_path = 'book/index.html' self.initial_paths = %w(